mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-22 08:04:20 +01:00
Fix nix wrapper usage with git locked inputs
Signed-off-by: magic_rb <richard@brezak.sk>
This commit is contained in:
parent
c9db1e39b5
commit
ac36a08bf2
18
flake.nix
18
flake.nix
|
@ -249,16 +249,26 @@
|
|||
i="0"
|
||||
|
||||
flake=0
|
||||
immutable=0
|
||||
|
||||
for arg in "$@" ; do
|
||||
if [[ "$arg" =~ "^git+file://.*$" ]] ; then
|
||||
immutable=1
|
||||
fi
|
||||
done
|
||||
|
||||
for arg in "$@" ; do
|
||||
case "$arg" in
|
||||
build|eval)
|
||||
build|eval|run)
|
||||
new_args[$i]="$arg"
|
||||
new_args[$(($i + 1))]="--reference-lock-file"
|
||||
new_args[$(($i + 2))]="flake-secret.lock"
|
||||
new_args[$(($i + 3))]="--output-lock-file"
|
||||
new_args[$(($i + 4))]="flake-secret.lock"
|
||||
i="$(($i + 5))"
|
||||
if [[ "$immutable" != 0 ]] ; then
|
||||
new_args[$(($i + 3))]="--output-lock-file"
|
||||
new_args[$(($i + 4))]="flake-secret.lock"
|
||||
i="$(($i + 2))"
|
||||
fi
|
||||
i="$(($i + 3))"
|
||||
;;
|
||||
flake)
|
||||
new_args[$i]="$arg"
|
||||
|
|
Loading…
Reference in a new issue