-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdefault.nix
38 lines (30 loc) · 910 Bytes
/
default.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
{ rev ? "e7603eba51f2c7820c0a182c6bbb351181caa8e7" # release-22.11
, sha256 ? "sha256:0mwck8jyr74wh1b7g6nac1mxy6a0rkppz8n12andsffybsipz5jw"
, pkgs ?
if builtins.compareVersions builtins.nixVersion "2.0" < 0
then abort "haskell-candid requires at least nix 2.0"
else import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
inherit sha256;
}) {
config.allowUnfree = true;
config.allowBroken = false;
}
, returnShellEnv ? pkgs.lib.inNixShell
, mkDerivation ? null
}:
let
drv = pkgs.haskellPackages.developPackage {
name = "candid";
root = ./.;
overrides = with pkgs.haskell.lib; self: super: {
crc = markUnbroken (dontCheck super.crc);
};
modifier = drv: pkgs.haskell.lib.overrideCabal drv (attrs: {
passthru = {
nixpkgs = pkgs;
};
});
inherit returnShellEnv;
};
in drv