This repository has been archived by the owner on Feb 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 267
/
default.nix
110 lines (91 loc) · 2.85 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# 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; };
# 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
''
# environment variables used by rust tests directly
export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
# config file used by aws cli tool
export AWS_CONFIG_FILE=`pwd`/.aws/config
export HC_TARGET_PREFIX=$NIX_ENV_PREFIX
export CARGO_TARGET_DIR="$HC_TARGET_PREFIX/target"
export CARGO_CACHE_RUSTC_INFO=1
''
];
buildInputs = [ holonix.pkgs.libiconv ]
++ holonix.shell.buildInputs
++ (holonix.pkgs.callPackage ./app_spec_proc_macro {
pkgs = holonix.pkgs;
}).buildInputs
++ (holonix.pkgs.callPackage ./crates/holochain {
pkgs = holonix.pkgs;
}).buildInputs
++ (holonix.pkgs.callPackage ./crates/holochain_wasm {
pkgs = holonix.pkgs;
}).buildInputs
++ (holonix.pkgs.callPackage ./crates/cli {
pkgs = holonix.pkgs;
config = config;
}).buildInputs
++ (holonix.pkgs.callPackage ./crates/trycp_server {
pkgs = holonix.pkgs;
config = config;
}).buildInputs
++ (holonix.pkgs.callPackage ./crates/sim2h_server {
pkgs = holonix.pkgs;
config = config;
}).buildInputs
++ (holonix.pkgs.callPackage ./crates/metrics {
pkgs = holonix.pkgs;
config = config;
}).buildInputs
++ (holonix.pkgs.callPackage ./docker {
pkgs = holonix.pkgs;
}).buildInputs
# release hooks
++ (holonix.pkgs.callPackage ./release {
holonix = holonix;
pkgs = holonix.pkgs;
config = config;
}).buildInputs
++ (holonix.pkgs.callPackage ./rust {
holonix = holonix;
pkgs = holonix.pkgs;
}).buildInputs
++ (holonix.pkgs.callPackage ./stress-test {
pkgs = holonix.pkgs;
}).buildInputs
# main test script
++ (holonix.pkgs.callPackage ./test {
pkgs = holonix.pkgs;
}).buildInputs
++ (holonix.pkgs.callPackage ./.aws {
pkgs = holonix.pkgs;
}).buildInputs
++ (holonix.pkgs.callPackage ./dynamodb {
pkgs = holonix.pkgs;
}).buildInputs
;
});
}