mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
Disallow writing a lock file during flake archival
This commit is contained in:
parent
b1b717221a
commit
d93ad1d842
1 changed files with 3 additions and 1 deletions
4
direnvrc
4
direnvrc
|
|
@ -198,8 +198,10 @@ use_flake() {
|
||||||
local flake_input_paths
|
local flake_input_paths
|
||||||
rm -rf "$flake_inputs"
|
rm -rf "$flake_inputs"
|
||||||
mkdir "$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" \
|
--extra-experimental-features "nix-command flakes" \
|
||||||
|
--no-write-lock-file \
|
||||||
"$flake_dir" | grep -E -o '/nix/store/[^"]+')
|
"$flake_dir" | grep -E -o '/nix/store/[^"]+')
|
||||||
for path in $flake_input_paths; do
|
for path in $flake_input_paths; do
|
||||||
_nix_add_gcroot "$path" "${flake_inputs}/${path##*/}"
|
_nix_add_gcroot "$path" "${flake_inputs}/${path##*/}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue