forked from h-be/acorn-hc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
48 lines (43 loc) · 1.37 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
# This is an example of what downstream consumers of holonix should do
# This is also used to dogfood as many commands as possible for holonix
# For example the release process for holonix uses this file
let
# point this to your local config.nix file for this project
# example.config.nix shows and documents a lot of the options
config = import ./config.nix;
# START HOLONIX IMPORT BOILERPLATE
holonix = import (
if ! config.holonix.use-github
then config.holonix.local.path
else fetchTarball {
url = "https://github.com/${config.holonix.github.owner}/${config.holonix.github.repo}/tarball/${config.holonix.github.ref}";
sha256 = config.holonix.github.sha256;
}
) { config = config; use-stable-rust = true; };
# END HOLONIX IMPORT BOILERPLATE
in
with holonix.pkgs;
{
dev-shell = stdenv.mkDerivation (holonix.shell // {
name = "dev-shell";
shellHook = holonix.pkgs.lib.concatStrings [
holonix.shell.shellHook
# NIX_ENFORCE_PURITY to fix = note: impure path `/[...]' used in link
# https://nixos.wiki/wiki/Development_environment_with_nix-shell
''
export NIX_ENFORCE_PURITY=0
./install-holochain.sh
cd test && npm install && cd ..
npm install
''
];
buildInputs = [ ]
++ holonix.shell.buildInputs
++ config.buildInputs
++ (holonix.pkgs.callPackage ./nix {
holonix = holonix;
config = config;
}).buildInputs
;
});
}