mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
Add a ca-derivations required machine feature
Make ca-derivations require a `ca-derivations` machine feature, and ca-aware builders expose it. That way, a network of builders can mix ca-aware and non-ca-aware machines, and the scheduler will send them in the right place.
This commit is contained in:
parent
8e6ee1b9e9
commit
7c077d2a0f
5 changed files with 22 additions and 4 deletions
|
@ -4,4 +4,6 @@ file=build-hook-ca-floating.nix
|
|||
|
||||
sed -i 's/experimental-features .*/& ca-derivations/' "$NIX_CONF_DIR"/nix.conf
|
||||
|
||||
CONTENT_ADDRESSED=true
|
||||
|
||||
source build-remote.sh
|
||||
|
|
|
@ -6,12 +6,17 @@ unset NIX_STATE_DIR
|
|||
|
||||
function join_by { local d=$1; shift; echo -n "$1"; shift; printf "%s" "${@/#/$d}"; }
|
||||
|
||||
EXTRA_SYSTEM_FEATURES=()
|
||||
if [[ -n "$CONTENT_ADDRESSED" ]]; then
|
||||
EXTRA_SYSTEM_FEATURES=("ca-derivations")
|
||||
fi
|
||||
|
||||
builders=(
|
||||
# system-features will automatically be added to the outer URL, but not inner
|
||||
# remote-store URL.
|
||||
"ssh://localhost?remote-store=$TEST_ROOT/machine1?system-features=foo - - 1 1 foo"
|
||||
"$TEST_ROOT/machine2 - - 1 1 bar"
|
||||
"ssh-ng://localhost?remote-store=$TEST_ROOT/machine3?system-features=baz - - 1 1 baz"
|
||||
"ssh://localhost?remote-store=$TEST_ROOT/machine1?system-features=$(join_by "%20" foo ${EXTRA_SYSTEM_FEATURES[@]}) - - 1 1 $(join_by "," foo ${EXTRA_SYSTEM_FEATURES[@]})"
|
||||
"$TEST_ROOT/machine2 - - 1 1 $(join_by "," bar ${EXTRA_SYSTEM_FEATURES[@]})"
|
||||
"ssh-ng://localhost?remote-store=$TEST_ROOT/machine3?system-features=$(join_by "%20" baz ${EXTRA_SYSTEM_FEATURES[@]}) - - 1 1 $(join_by "," baz ${EXTRA_SYSTEM_FEATURES[@]})"
|
||||
)
|
||||
|
||||
chmod -R +w $TEST_ROOT/machine* || true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue