-
Notifications
You must be signed in to change notification settings - Fork 7
/
flake.nix
34 lines (34 loc) · 1.17 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixpkgs-ghc88.url = "github:nixos/nixpkgs/76f2e271a2ef";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs@{ nixpkgs, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = nixpkgs.lib.systems.flakeExposed;
perSystem = { self', inputs', pkgs, system, ... }:
let
overlay = self: super: {
jrec = self.callCabal2nix "jrec" ./. { };
};
ghcVersions = {
ghc88 = inputs.nixpkgs-ghc88.legacyPackages.${system}.haskellPackages.extend overlay;
ghc92 = pkgs.haskellPackages.extend overlay;
};
in
{
packages.default = ghcVersions.ghc92.jrec;
devShells.default = ghcVersions.ghc92.shellFor {
packages = p: [ p.jrec ];
buildInputs = with ghcVersions.ghc92; [
cabal-install
ghcid
haskell-language-server
];
};
# Expose jrec built with GHC 8.8 so it can be tested in CI.
packages.jrec-ghc88 = ghcVersions.ghc88.jrec;
};
};
}