-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdefault.nix
More file actions
59 lines (51 loc) · 1.26 KB
/
default.nix
File metadata and controls
59 lines (51 loc) · 1.26 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
54
55
56
57
58
59
let
nix-shell-release-tag = "7ec672ca3aaeb6c4b8fbc416a94c778887bddfe7";
nix-shell-release-sha256 = "147xvybp8r85xiyzmaww4m21i6a17fdkz6ygvhqigjsbpwq9qg4v";
nix-shell = import (fetchTarball {
url = "https://github.com/thedavidmeister/nix-shadow-cljs/tarball/${nix-shell-release-tag}";
sha256 = "${nix-shell-release-sha256}";
});
in
with nix-shell.pkgs;
{
core-shell = stdenv.mkDerivation (nix-shell.shell // {
name = "core-shell";
SUPPRESS_NO_CONFIG_WARNING = "true";
ENV_TEST_VAR = "foo";
shellHook = nix-shell.pkgs.lib.concatStrings [
# extra shellHook commands here
''
''
nix-shell.shell.shellHook
];
buildInputs = [
(nix-shell.pkgs.writeShellScriptBin "flush"
''
rm -rf ./node_modules
rm -rf ./test
rm -rf ./.shadow-cljs
rm -rf ./repl-public
rm -rf ./repl-node
rm ./package-lock.json
'')
(nix-shell.pkgs.writeShellScriptBin "node-test"
''
set -euxo pipefail
shadow-cljs compile node-test
'')
(nix-shell.pkgs.writeShellScriptBin "browser-test"
''
set -euxo pipefail
shadow-cljs compile browser-test
karma start --single-run --browsers FirefoxHeadless
'')
(nix-shell.pkgs.writeShellScriptBin "all-test"
''
node-test
browser-test
'')
]
++ nix-shell.shell.buildInputs
;
});
}