-
Notifications
You must be signed in to change notification settings - Fork 0
/
remote-build.sh
27 lines (19 loc) · 1.01 KB
/
remote-build.sh
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
#!/usr/bin/env bash
# A hacky script to test the BuildDerivation worker op, which only activates on distributed builds.
# You'll have to change the hardcoded paths to your own home directory.
cd crates/drv-adapter && cargo build && cd ../..
cargo build
TEST_ROOT=/home/jneeman/tweag/nix-rev2/test-remote-store
#builder="ssh-ng://localhost?remote-store=$TEST_ROOT/remote?remote-program=/home/jneeman/tweag/nix-remote-rust/nix-remote-rust.sh - - 1 1 foo"
builder="ssh-ng://localhost?remote-program=/home/jneeman/tweag/nix-rev2/nix-remote-rust.sh - - 1 1 foo"
chmod -R +w $TEST_ROOT/remote || true
rm -rf $TEST_ROOT/remote/* || true
chmod -R +w $TEST_ROOT/local || true
rm -rf $TEST_ROOT/local/* || true
nix build -L -v -o result --max-jobs 0 \
--option builders-use-substitutes true \
.#test-file \
--store $TEST_ROOT/local \
--builders "$builder" --impure
#.#test \
#--expr '(builtins.getFlake "nixpkgs").legacyPackages.${builtins.currentSystem}.writeText "current-time" "${builtins.toString builtins.currentTime}"' \