1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 06:53:54 +02:00

Check requiredSystemFeatures for local builds

For example, this prevents a "kvm" build on machines that don't have
KVM.

Fixes #2012.
This commit is contained in:
Eelco Dolstra 2018-09-28 15:57:27 +02:00
parent 7ae7a38c9a
commit 1e7b8deea7
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
8 changed files with 79 additions and 16 deletions

View file

@ -11,7 +11,8 @@ rm -rf $TEST_ROOT/store0 $TEST_ROOT/store1
nix build -f build-hook.nix -o $TEST_ROOT/result --max-jobs 0 \
--sandbox-paths /nix/store --sandbox-build-dir /build-tmp \
--builders "$TEST_ROOT/store0; $TEST_ROOT/store1 - - 1 1 foo"
--builders "$TEST_ROOT/store0; $TEST_ROOT/store1 - - 1 1 foo" \
--system-features foo
outPath=$TEST_ROOT/result