From: Frank Doepper Date: Thu, 20 Jul 2023 14:29:40 +0000 (+0200) Subject: update to ghc-9.6, unix-2.8 X-Git-Tag: 0.6.4.0^0 X-Git-Url: https://woffs.de/git/fd/haskell-amqp-utils.git/commitdiff_plain/d93f14dcf674d8140c0847c0b9bf03630048a49a update to ghc-9.6, unix-2.8 --- diff --git a/ChangeLog.md b/ChangeLog.md index f7bd372..96a6014 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -10,6 +10,7 @@ SPDX-License-Identifier: GPL-3.0-only * fix exception handling and avoid hang * migrate to crypton-connection and crypton-x509-system, adjust deps +* update to ghc-9.6, unix-2.8 ## 0.6.3.2 -- 2021-10-25 diff --git a/Network/AMQP/Utils/Helpers.hs b/Network/AMQP/Utils/Helpers.hs index cb6ed2a..f2f2143 100644 --- a/Network/AMQP/Utils/Helpers.hs +++ b/Network/AMQP/Utils/Helpers.hs @@ -434,12 +434,8 @@ firstInputFile ((x,_,_):_) = x -- | read RawFilePath to Lazy ByteString readFileRawLazy :: RawFilePath -> IO BL.ByteString readFileRawLazy path = do - h <- openFd path ReadOnly Nothing defaultFlags >>= fdToHandle + h <- openFd path ReadOnly defaultFlags >>= fdToHandle hSetBinaryMode h True BL.hGetContents h where - defaultFlags = OpenFileFlags { System.Posix.IO.ByteString.append = False - , exclusive = False - , noctty = True - , nonBlock = False - , trunc = False } + defaultFlags = defaultFileFlags { noctty = True } diff --git a/amqp-utils.cabal b/amqp-utils.cabal index d0ef9f8..d6660f7 100644 --- a/amqp-utils.cabal +++ b/amqp-utils.cabal @@ -39,7 +39,7 @@ Tested-With: GHC ==7.10.2 || ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || >=8.8.4 executable konsum main-is: konsum.hs - build-depends: base >=4.6 && <5, + build-depends: base >= 4.6 && <5, containers, text, crypton-connection, @@ -53,8 +53,8 @@ executable konsum crypton-x509-system, network > 2.6, tls >= 1.7.0, - amqp >=0.22.2, - unix >= 2.7 + amqp >= 0.22.2, + unix >= 2.8 ghc-options: -threaded -Wall @@ -67,7 +67,7 @@ executable konsum executable agitprop main-is: agitprop.hs - build-depends: base >=4.6 && <5, + build-depends: base >= 4.6 && <5, containers, text, crypton-connection, @@ -83,8 +83,8 @@ executable agitprop crypton-x509-system, network > 2.6, tls >= 1.7.0, - amqp >=0.22.2, - unix >= 2.7, + amqp >= 0.22.2, + unix >= 2.8, magic if os(linux) build-depends: hinotify >= 0.3.10 @@ -115,7 +115,7 @@ executable plane network > 2.6, tls >= 1.7.0, amqp >=0.22.2, - unix >= 2.7 + unix >= 2.8 ghc-options: -threaded -Wall @@ -128,7 +128,7 @@ executable plane executable arbeite main-is: arbeite.hs - build-depends: base >=4.6 && <5, + build-depends: base >= 4.6 && <5, containers, text, crypton-connection, @@ -142,8 +142,8 @@ executable arbeite crypton-x509-system, network > 2.6, tls >= 1.7.0, - amqp >=0.22.2, - unix >= 2.7 + amqp >= 0.22.2, + unix >= 2.8 ghc-options: -threaded -Wall diff --git a/flake.nix b/flake.nix index 8e95bad..29e746e 100644 --- a/flake.nix +++ b/flake.nix @@ -15,7 +15,7 @@ pkgs = nixpkgs.legacyPackages.${system}; t = pkgs.lib.trivial; hl = pkgs.haskell.lib; - hp = pkgs.haskellPackages; + hp = pkgs.haskell.packages.ghc96; project = { withEnv ? false }: hp.developPackage { root = ./.; @@ -26,6 +26,14 @@ amqp = hl.dontCheck super.amqp_0_22_2; tls = super.tls_1_7_0; crypton-connection = super.crypton-connection.override { inherit tls; }; + rawfilepath = hl.overrideCabal super.rawfilepath { + src = pkgs.fetchFromGitHub { + owner = "georgefst"; + repo = "rawfilepath"; + rev = "044079fa0c3a407037be9086fab92f1209dfb1a8"; + hash = "sha256-2LFMLjhm6lLzXTditN0pi9R4QKg0zdBsDOPhcQUD1lQ="; + }; + }; }; modifier = (t.flip t.pipe) [ hl.dontHaddock diff --git a/stack.yaml b/stack.yaml index 185c5ae..3dcf7ce 100644 --- a/stack.yaml +++ b/stack.yaml @@ -2,10 +2,14 @@ # # SPDX-License-Identifier: GPL-3.0-only -resolver: lts-19.15 +resolver: nightly-2023-07-19 flags: {} extra-package-dbs: [] packages: - '.' nix: packages: [ file ] +extra-deps: +- amqp-0.22.2 +- git: https://github.com/georgefst/rawfilepath/ + commit: 044079fa0c3a407037be9086fab92f1209dfb1a8