diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 2918af2..dc75b0e 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.16.3 +# version: 0.18.1 # -# REGENDATA ("0.16.3",["github","wai-handler-hal.cabal"]) +# REGENDATA ("0.18.1",["github","wai-handler-hal.cabal"]) # name: Haskell-CI on: @@ -28,9 +28,14 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.6.2 + - compiler: ghc-9.8.2 compilerKind: ghc - compilerVersion: 9.6.2 + compilerVersion: 9.8.2 + setup-method: ghcup + allow-failure: false + - compiler: ghc-9.6.4 + compilerKind: ghc + compilerVersion: 9.6.4 setup-method: ghcup allow-failure: false - compiler: ghc-9.4.5 @@ -71,18 +76,18 @@ jobs: apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 if [ "${{ matrix.setup-method }}" = ghcup ]; then mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) else apt-add-repository -y 'ppa:hvr/ghc' apt-get update apt-get install -y "$HCNAME" mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) fi env: HCKIND: ${{ matrix.compilerKind }} @@ -96,17 +101,19 @@ jobs: echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER if [ "${{ matrix.setup-method }}" = ghcup ]; then - HC=$HOME/.ghcup/bin/$HCKIND-$HCVER + HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") + HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') + HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV" - echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" + echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" + echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" else HC=$HCDIR/bin/$HCKIND echo "HC=$HC" >> "$GITHUB_ENV" echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" fi HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') diff --git a/flake.lock b/flake.lock index 3192735..21fc4f0 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1697772615, - "narHash": "sha256-w3yK1C6/JsBVvZRKnZw4HPBajYWpcA2BR3t13mfALzE=", + "lastModified": 1719540486, + "narHash": "sha256-9Pw2PSOhLLr+M2pwd04RuYvem7l88g/Mh9kJNyKhyno=", "owner": "bellroy", "repo": "bellroy-nix-foss", - "rev": "35391828c0526c0ce7bfa52c3dfb49e818f8740f", + "rev": "e0c388f67e4821a3a3526e0a8547711c1de772f0", "type": "github" }, "original": { @@ -23,11 +23,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "owner": "edolstra", "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "type": "github" }, "original": { @@ -41,11 +41,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1687709756, - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -56,11 +56,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1688492144, - "narHash": "sha256-xjijhELugHZF8QGoJ20VU0buC7yC/8R5z9W0MeKRrJ4=", + "lastModified": 1719082008, + "narHash": "sha256-jHJSUH619zBQ6WdC21fFAlDxHErKVDJ5fpN0Hgx4sjs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ec322bf9e598a510995e7540f17af57ee0c8d5b9", + "rev": "9693852a2070b398ee123a329e68f0dab5526681", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 541dc82..7c646ab 100644 --- a/flake.nix +++ b/flake.nix @@ -5,20 +5,14 @@ outputs = inputs: inputs.bellroy-nix-foss.lib.haskellProject { - cabalPackages = [ - { - name = "wai-handler-hal"; - path = ./wai-handler-hal.nix; - } + supportedCompilers = [ + "ghc8107" + "ghc92" + "ghc94" + "ghc96" + "ghc98" + "ghc910" ]; - supportedCompilers = [ "ghc8107" "ghc92" "ghc94" ]; - defaultCompiler = "ghc92"; - haskellPackagesOverride = { compilerName, haskellLib, final, prev }: - if compilerName == "ghc94" - then { - # hal doesn't support newer hedgehog - hedgehog = haskellLib.compose.dontCheck (prev.callHackage "hedgehog" "1.1.2" { }); - } - else { }; + defaultCompiler = "ghc96"; }; } diff --git a/wai-handler-hal.cabal b/wai-handler-hal.cabal index d67a9c5..cef4457 100644 --- a/wai-handler-hal.cabal +++ b/wai-handler-hal.cabal @@ -21,8 +21,7 @@ maintainer: Bellroy Tech Team copyright: Copyright (C) 2021, 2024 Bellroy Pty Ltd category: AWS, Cloud build-type: Simple -extra-doc-files: - CHANGELOG.md +extra-doc-files: CHANGELOG.md extra-source-files: README.md test/data/ProxyRequest.json @@ -35,7 +34,8 @@ tested-with: || ==9.0.2 || ==9.2.4 || ==9.4.5 - || ==9.6.2 + || ==9.6.4 + || ==9.8.2 common opts default-language: Haskell2010 @@ -48,15 +48,15 @@ common opts common deps build-depends: - , base >=4.12 && <4.19 + , base >=4.12 && <4.21 , base64-bytestring >=1.0.0.0 && <1.3 , bytestring >=0.10.8 && <0.13 , case-insensitive ^>=1.2.0.0 , hal >=0.4.7 && <0.4.11 || >=1.0.0 && <1.2 , http-media ^>=0.8.1.1 , http-types ^>=0.12.3 - , network >=2.8.0.0 && <3.2 - , text ^>=1.2.3 || >=2.0 && <2.2 + , network >=2.8.0.0 && <3.3 + , text ^>=1.2.3 || ^>=2.0 || ^>=2.1 , unordered-containers ^>=0.2.10.0 , vault ^>=0.3.1.0 , wai ^>=3.2.2 diff --git a/wai-handler-hal.nix b/wai-handler-hal.nix deleted file mode 100644 index 0aedc00..0000000 --- a/wai-handler-hal.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ mkDerivation, aeson, base, base64-bytestring, bytestring, case-insensitive, hal, http-types, - network, pretty-simple, unordered-containers, vault, wai, lib, tasty, tasty-discover, tasty-golden, text -}: -mkDerivation { - pname = "wai-handler-hal"; - version = "0.2.0.0"; - src = ./.; - libraryHaskellDepends = [ - base base64-bytestring bytestring case-insensitive hal http-types network text unordered-containers vault wai - ]; - testHaskellDepends = [ - aeson base pretty-simple tasty tasty-golden text - ]; - testToolDepends = [ tasty-discover ]; - description = "Wrap WAI applications to run on AWS Lambda"; - license = lib.licenses.bsd3; -}