-
Notifications
You must be signed in to change notification settings - Fork 48
/
flake.nix
58 lines (55 loc) · 2 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
description = "Extensible records for Haskell.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system: let
compiler = "8107";
# compiler = "921";
pkgs = import nixpkgs {
inherit system;
};
dontCheck = pkgs.haskell.lib.dontCheck;
dontHaddock = pkgs.haskell.lib.dontHaddock;
overrideSrc = pkgs.haskell.lib.overrideSrc;
hspkgs = (pkgs.haskell.packages."ghc${compiler}").override {
overrides = self: super:
if compiler == "921"
then {
QuickCheck = dontCheck super.QuickCheck;
SHA = super.SHA.override { QuickCheck = self.QuickCheck; };
optparse-applicative = dontCheck super.optparse-applicative;
case-insensitive = dontCheck super.case-insensitive;
base-compat-batteries = dontCheck super.base-compat-batteries;
attoparsec = dontCheck super.attoparsec;
generic-deriving = dontHaddock super.generic-deriving;
tasty-golden = dontHaddock super.tasty-golden;
aeson = dontCheck (super.callHackage "aeson" "2.0.3.0" {});
microlens = pkgs.haskell.lib.dontHaddock super.microlens;
lens-aeson = overrideSrc super.lens-aeson {
version = "1.2";
src = pkgs.fetchFromGitHub {
owner = "lens";
repo = "lens-aeson";
rev = "28ff4ffd778c6e42084cff26e9c9d973b0645cd9";
hash = "sha256-AO7X3fvdgTYJeoVViQSXZq3BqLtHl8/PAcSoxWxfpXg=";
};
};
}
else { };
};
drv = hspkgs.callPackage ./default.nix {};
ghc = hspkgs.ghc.withPackages (ps:
drv.passthru.getBuildInputs.haskellBuildInputs
);
in {
devShell = pkgs.mkShell {
buildInputs = [
ghc
hspkgs.cabal-install
];
};
});
}