forked from holochain/holonix-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
71 lines (66 loc) · 1.89 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# This is the default nix file FOR HOLONIX
# This file is what nix will find when hitting this repo as a tarball
# This means that downstream consumers should pkgs.callPackage this file
# See example.default.nix for an example of how to consume this file downstream
{
# allow consumers to pass in their own config
# fallback to empty sets
config ? import ./config.nix
}:
let
pkgs = import ./nixpkgs;
aws = pkgs.callPackage ./aws { };
darwin = pkgs.callPackage ./darwin { };
rust = pkgs.callPackage ./rust { };
node = pkgs.callPackage ./node { };
git = pkgs.callPackage ./git { };
dist = pkgs.callPackage ./dist {
rust = rust;
node = node;
git = git;
darwin = darwin;
};
docs = pkgs.callPackage ./docs { };
n3h = pkgs.callPackage ./n3h { };
openssl = pkgs.callPackage ./openssl { };
release = pkgs.callPackage ./release {
config = config;
};
test = pkgs.callPackage ./test {
pkgs = pkgs;
};
holonix-shell = pkgs.callPackage ./nix-shell {
pkgs = pkgs;
aws = aws;
darwin = darwin;
dist = dist;
docs = docs;
git = git;
n3h = n3h;
node = node;
openssl = openssl;
release = release;
rust = rust;
test = test;
};
# override and overrideDerivation cannot be handled by mkDerivation
derivation-safe-holonix-shell = (removeAttrs holonix-shell ["override" "overrideDerivation"]);
in
{
pkgs = pkgs;
# export the set used to build shell alongside the main derivation
# downstream devs can extend/override the shell as needed
# holonix-shell provides canonical dev shell for generic work
shell = derivation-safe-holonix-shell;
main = pkgs.stdenv.mkDerivation derivation-safe-holonix-shell;
# needed for nix-env to discover install attributes
holochain = {
hc = dist.cli.derivation;
holochain = dist.holochain.derivation;
sim2h_server = dist.sim2h_server.derivation;
trycp_server = dist.trycp_server.derivation;
};
# expose other things
rust = rust;
darwin = darwin;
}