on master help sign in
nix: Build on GHC 8.8 as well

We are using a different nixpkgs only because that's what default.nix has been using.

commit407b588e30853eee5366d880dc606e3f66525b1c authorSridhar Ratnakumar <srid@srid.ca> dateSun 12 Mar 2023, 20:17 (4 years ago) parent44f2459
3 files changed+30−5
.github/workflows/ci.yaml+2 flake.lock+18−1 flake.nix+10−4
.github/workflows/ci.yaml+2
@@ -13,3 +13,5 @@ jobs:
1313 experimental-features = nix-command flakes
1414 - name: Build and test 🔧
1515 run: nix build -j 4 -L
16+ - name: Build and test (GHC 8.8) 🔧
17+ run: nix build -j 4 -L .#jrec-ghc88
flake.lock+18−1
@@ -34,6 +34,22 @@
3434 "type": "github"
3535 }
3636 },
37+ "nixpkgs-ghc88": {
38+ "locked": {
39+ "lastModified": 1596466290,
40+ "narHash": "sha256-V1vrlYfVEdW4iauUc58LCtorSxLLF+X/PhjD5+dQjeQ=",
41+ "owner": "nixos",
42+ "repo": "nixpkgs",
43+ "rev": "76f2e271a2ef9de3734dcc9d366a42d6bfb18e82",
44+ "type": "github"
45+ },
46+ "original": {
47+ "owner": "nixos",
48+ "ref": "76f2e271a2ef",
49+ "repo": "nixpkgs",
50+ "type": "github"
51+ }
52+ },
3753 "nixpkgs-lib": {
3854 "locked": {
3955 "dir": "lib",
@@ -55,7 +71,8 @@
5571 "root": {
5672 "inputs": {
5773 "flake-parts": "flake-parts",
58− "nixpkgs": "nixpkgs"
74+ "nixpkgs": "nixpkgs",
75+ "nixpkgs-ghc88": "nixpkgs-ghc88"
5976 }
6077 }
6178 },
flake.nix+10−4
@@ -1,6 +1,7 @@
11{
22 inputs = {
33 nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
4+ nixpkgs-ghc88.url = "github:nixos/nixpkgs/76f2e271a2ef";
45 flake-parts.url = "github:hercules-ci/flake-parts";
56 };
67 outputs = inputs@{ nixpkgs, flake-parts, ... }:
@@ -11,17 +12,22 @@
1112 overlay = self: super: {
1213 jrec = self.callCabal2nix "jrec" ./. { };
1314 };
14− haskellPackages' = pkgs.haskellPackages.extend overlay;
15+ ghcVersions = {
16+ ghc88 = inputs.nixpkgs-ghc88.legacyPackages.${system}.haskellPackages.extend overlay;
17+ ghc92 = pkgs.haskellPackages.extend overlay;
18+ };
1519 in
1620 {
17− packages.default = haskellPackages'.jrec;
18− devShells.default = haskellPackages'.shellFor {
21+ packages.default = ghcVersions.ghc92.jrec;
22+ devShells.default = ghcVersions.ghc92.shellFor {
1923 packages = p: [ p.jrec ];
20− buildInputs = with haskellPackages'; [
24+ buildInputs = with ghcVersions.ghc92; [
2125 cabal-install
2226 haskell-language-server
2327 ];
2428 };
29+ # Expose jrec built with GHC 8.8 so it can be tested in CI.
30+ packages.jrec-ghc88 = ghcVersions.ghc88.jrec;
2531 };
2632 };
2733}