mirror of
https://github.com/NixOS/nix
synced 2025-07-07 18:31:49 +02:00
Merge pull request #6664 from Ma27/innixshell-backwards-compat
nix-shell: restore backwards-compat with old nixpkgs
This commit is contained in:
commit
d63cd77549
3 changed files with 43 additions and 5 deletions
|
@ -1 +1 @@
|
|||
{ ... }@args: import ./shell.nix (args // { contentAddressed = true; })
|
||||
{ inNixShell ? false, ... }@args: import ./shell.nix (args // { contentAddressed = true; })
|
||||
|
|
|
@ -102,3 +102,11 @@ source <(nix print-dev-env -f "$shellDotNix" shellDrv)
|
|||
[[ ${arr2[1]} = $'\n' ]]
|
||||
[[ ${arr2[2]} = $'x\ny' ]]
|
||||
[[ $(fun) = blabla ]]
|
||||
|
||||
# Test nix-shell with ellipsis and no `inNixShell` argument (for backwards compat with old nixpkgs)
|
||||
cat >$TEST_ROOT/shell-ellipsis.nix <<EOF
|
||||
{ system ? "x86_64-linux", ... }@args:
|
||||
assert (!(args ? inNixShell));
|
||||
(import $shellDotNix { }).shellDrv
|
||||
EOF
|
||||
nix-shell $TEST_ROOT/shell-ellipsis.nix --run "true"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue