Disallow writing a lock file during flake archival

This commit is contained in:
Bryan Bennett 2022-08-22 14:49:17 -04:00
parent b1b717221a
commit d93ad1d842
No known key found for this signature in database
GPG key ID: EF90E3E98B8F5C0B

View file

@ -198,8 +198,10 @@ use_flake() {
local flake_input_paths
rm -rf "$flake_inputs"
mkdir "$flake_inputs"
flake_input_paths=$("${NIX_BIN_PREFIX}nix" flake archive --json \
flake_input_paths=$("${NIX_BIN_PREFIX}nix" flake archive \
--json \
--extra-experimental-features "nix-command flakes" \
--no-write-lock-file \
"$flake_dir" | grep -E -o '/nix/store/[^"]+')
for path in $flake_input_paths; do
_nix_add_gcroot "$path" "${flake_inputs}/${path##*/}"