From 04ec3eff8b70bbe453f4af4050c29253b60314ac Mon Sep 17 00:00:00 2001 From: Langston Barrett Date: Thu, 22 Feb 2024 11:27:37 -0500 Subject: [PATCH] Support GHC 9.8, drop GHC 9.2 --- .github/workflows/build.yml | 2 +- .github/workflows/nix-ci.yml | 2 +- README.md | 2 +- doc/developing.md | 1 + flake.lock | 40 ++++++++++++++++++++++++------------ flake.nix | 19 ++++++++++++----- llvm-pretty-bc-parser.cabal | 2 +- 7 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5ecb2a7b..5aa4fc53 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: matrix: os: [ubuntu-22.04] # See doc/developing.md - ghc: ["9.2.8", "9.4.5", "9.6.2"] + ghc: ["9.4.5", "9.6.2", "9.8.1"] name: build - ${{ matrix.ghc }} - ${{ matrix.os }} steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/nix-ci.yml b/.github/workflows/nix-ci.yml index d2cd78a1..4b82f597 100644 --- a/.github/workflows/nix-ci.yml +++ b/.github/workflows/nix-ci.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ghc-version: [ "ghc96", "ghc94", "ghc92", "ghc810", "ghc88" ] + ghc-version: [ "ghc98", "ghc96", "ghc94" ] steps: - uses: cachix/install-nix-action@v20 with: diff --git a/README.md b/README.md index 19ecc476..2660a161 100644 --- a/README.md +++ b/README.md @@ -59,9 +59,9 @@ llvm-pretty-bc-parser endeavors to support three versions of GHC at a time. See the developers' documentation for more details and a rationale: [doc/developing.md](./doc/developing.md). Currently supported: -- GHC 9.2.8 - GHC 9.4.5 - GHC 9.6.2 +- GHC 9.8.1 [fuzz-workflow]: https://github.com/GaloisInc/llvm-pretty-bc-parser/blob/master/.github/workflows/llvm-quick-fuzz.yml [llvm13]: https://github.com/GaloisInc/llvm-pretty-bc-parser/issues?q=is%3Aopen+is%3Aissue+label%3Allvm%2F13.0 diff --git a/doc/developing.md b/doc/developing.md index 96b8e8f0..ab8bc738 100644 --- a/doc/developing.md +++ b/doc/developing.md @@ -96,4 +96,5 @@ When updating the supported GHC versions, remember to update: - [The README](../README.md) - [The Cabal file](../llvm-pretty-bc-parser.cabal)'s `Tested-with` field +- [The Nix flake](../flake.nix) - [CI workflows](../.github/workflows) diff --git a/flake.lock b/flake.lock index 1bc3a044..7e21c26b 100644 --- a/flake.lock +++ b/flake.lock @@ -3,23 +3,20 @@ "fgl-src": { "flake": false, "locked": { - "lastModified": 1676021714, - "narHash": "sha256-812R4Hf/smMikINWgpvDYOLm6h+PkF6FAsSPcHSzKBE=", - "owner": "haskell", - "repo": "fgl", - "rev": "b8c417f470dd6ac25eebacd326c3b2db85e71f27", - "type": "github" + "lastModified": 1000000000, + "narHash": "sha256-2sJ1uyziIe2ZwAHLQCoYTo+35nMSof30XeU/2ZcjLOM=", + "type": "tarball", + "url": "https://hackage.haskell.org/package/fgl-5.8.2.0/fgl-5.8.2.0.tar.gz" }, "original": { - "owner": "haskell", - "ref": "5.8.1.1", - "repo": "fgl", - "type": "github" + "type": "tarball", + "url": "https://hackage.haskell.org/package/fgl-5.8.2.0/fgl-5.8.2.0.tar.gz" } }, "fgl-visualize-src": { "flake": false, "locked": { + "lastModified": 1368739575, "narHash": "sha256-2EC57Y+B5ryWjWeLqzHeSNkb4RjUtvj8+8vebz86dnQ=", "type": "tarball", "url": "https://hackage.haskell.org/package/fgl-visualize-0.1.0.1/fgl-visualize-0.1.0.1.tar.gz" @@ -110,11 +107,11 @@ "llvm-pretty-src": { "flake": false, "locked": { - "lastModified": 1706635035, - "narHash": "sha256-d6roSOu6FMa/z/Rlio1TO+kJ09vx34gOz0NDhfMrF0o=", + "lastModified": 1709056806, + "narHash": "sha256-f5f6wmCKqINPL8d/ShWf5K37drhgJGnzb3fruv5gX9U=", "owner": "elliottt", "repo": "llvm-pretty", - "rev": "e7b2bf1371e51bbc9e7a35070ae311b5a4b2c387", + "rev": "1f6118dfd25930aac09a7030990c57f857544ee7", "type": "github" }, "original": { @@ -124,6 +121,22 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1709038661, + "narHash": "sha256-Ys611iT6pChGv954aa4f8oKoDKJG3IXjJjPhnj6uaLY=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "8520c158aee718c6e87b56881105fc4223c3c723", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-ghc8": { "locked": { "lastModified": 1685566663, "narHash": "sha256-btHN1czJ6rzteeCuE/PNrdssqYD2nIA4w48miQAFloM=", @@ -163,6 +176,7 @@ "levers": "levers", "llvm-pretty-src": "llvm-pretty-src", "nixpkgs": "nixpkgs", + "nixpkgs-ghc8": "nixpkgs-ghc8", "optparse-applicative-src": "optparse-applicative-src", "tasty-expected-failure-src": "tasty-expected-failure-src", "tasty-src": "tasty-src", diff --git a/flake.nix b/flake.nix index 0316c01b..0f399c27 100644 --- a/flake.nix +++ b/flake.nix @@ -10,7 +10,8 @@ nixConfig.bash-prompt-suffix = "llvm-pretty-bc-parser.env} "; inputs = { - nixpkgs = { url = "github:nixos/nixpkgs/23.05"; }; + nixpkgs-ghc8 = { url = "github:nixos/nixpkgs/23.05"; }; + nixpkgs = { url = "github:nixos/nixpkgs/nixpkgs-unstable"; }; levers = { url = "github:kquick/nix-levers"; inputs.nixpkgs.follows = "nixpkgs"; @@ -20,7 +21,7 @@ flake = false; }; fgl-src = { - url = "github:haskell/fgl/5.8.1.1"; + url = "https://hackage.haskell.org/package/fgl-5.8.2.0/fgl-5.8.2.0.tar.gz"; flake = false; }; fgl-visualize-src = { @@ -48,7 +49,7 @@ }; }; - outputs = { self, levers, nixpkgs + outputs = { self, levers, nixpkgs, nixpkgs-ghc8 , llvm-pretty-src , fgl-src , fgl-visualize-src @@ -96,10 +97,18 @@ packages = levers.eachSystem (system: let - mkHaskell = levers.mkHaskellPkg { + mkHaskellGhc9 = levers.mkHaskellPkg { inherit nixpkgs system; }; - pkgs = import nixpkgs { inherit system; }; + mkHaskellGhc8 = levers.mkHaskellPkg { + inherit system; + nixpkgs = nixpkgs-ghc8; + }; + mkHaskell = name: src: ovrDrvOrArgs: + let blds8 = mkHaskellGhc8 name src ovrDrvOrArgs; + blds9 = mkHaskellGhc9 name src ovrDrvOrArgs; + in (blds8 // blds9); + pkgs = import nixpkgs-ghc8 { inherit system; }; wrap = levers.pkg_wrapper system pkgs; haskellAdj = drv: with (pkgs.haskell).lib; diff --git a/llvm-pretty-bc-parser.cabal b/llvm-pretty-bc-parser.cabal index 22cbf1f3..6cd56a59 100644 --- a/llvm-pretty-bc-parser.cabal +++ b/llvm-pretty-bc-parser.cabal @@ -10,7 +10,7 @@ Maintainer: Ryan Scott Category: Text Build-type: Simple Synopsis: LLVM bitcode parsing library -Tested-with: GHC==8.8, GHC==8.10, GHC==9.2, GHC==9.4, GHC==9.6 +Tested-with: GHC==9.4, GHC==9.6, GHC==9.8 Description: A parser for the LLVM bitcode file format, yielding a Module from the