This commit is contained in:
2025-02-17 09:28:56 +01:00
parent 388636377e
commit 15f6a71125

View File

@@ -4,7 +4,13 @@ function ns() {
args+=(nixpkgs#"$pkg")
done
>&2 echo + exec nix shell "${args[@]}"
local tmp=$(nix --extra-experimental-features "nix-command flakes" shell "${args[@]}" -c sh -c 'echo $PATH')
local tmp=$(
export NIXPKGS_ALLOW_BROKEN
export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM
export NIXPKGS_ALLOW_UNFREE
export NIXPKGS_ALLOW_INSECURE
nix --extra-experimental-features "nix-command flakes" shell --impure "${args[@]}" -c sh -c 'echo $PATH'
)
test $? -eq 0 && -n "$tmp" || return 1
export PATH="$tmp"
}