This repository was archived by the owner on Jan 9, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdefault.nix
More file actions
53 lines (45 loc) · 1.54 KB
/
default.nix
File metadata and controls
53 lines (45 loc) · 1.54 KB
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
{ system ? builtins.currentSystem
, withHoogle ? false
, kpkgs ? import ./dep/kpkgs {}
}:
kpkgs.rp.project ({ pkgs, hackGet, ... }:
let
pactSrc = hackGet ./dep/pact; # https://github.com/kadena-io/pact/pull/786
hs-abci = hackGet ./dep/hs-abci;
tendermint = pkgs.callPackage ./dep/tendermint.nix {};
overrides = with pkgs.haskell.lib; pkgs.lib.foldr pkgs.lib.composeExtensions (_: _: {}) [
(import hs-abci {}).overrides
(self: super: {
# TODO: make tests as pure as possible
kadenamint = dontCheck (overrideCabal super.kadenamint (drv: {
buildTools = (drv.buildTools or []) ++ [ pkgs.buildPackages.makeWrapper ];
executableSystemDepends = (drv.executableSystemDepends or []) ++ [tendermint pkgs.z3];
postFixup = ''
${drv.postFixup or ""}
wrapProgram "$out"/bin/kadenamint --set SBV_Z3 ${pkgs.z3}/bin/z3
'';
}));
pact = dontCoverage (addBuildDepend (self.callCabal2nix "pact" pactSrc {}) pkgs.z3);
tomland = dontCheck (self.callHackageDirect {
pkg = "tomland";
ver = "1.0.1.0";
sha256 = "0m9x09f694rlkmvmrba79dcffzdy8abs6fs56j8a6525lx46vccl";
} {});
})
];
in {
inherit overrides withHoogle;
passthru = {
inherit overrides tendermint;
inherit (pkgs) tmux;
nixpkgs = pkgs;
overrideDerivation = pkgs.lib.overrideDerivation;
};
packages = {
kadenamint = kpkgs.gitignoreSource ./.;
};
shells = {
ghc = ["kadenamint"];
};
}
)