mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
* Don't create a temporary file in $HOME.
svn path=/nixos/branches/modular-nixos/; revision=16561
This commit is contained in:
parent
6802a75076
commit
383370f782
1 changed files with 7 additions and 6 deletions
|
@ -81,6 +81,10 @@ if test "$action" = dry-run; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
tmpDir=$(mktemp -t -d nixos-rebuild.XXXXXX)
|
||||||
|
trap 'rm -rf "$tmpDir"' EXIT
|
||||||
|
|
||||||
|
|
||||||
# If the Nix daemon is running, then use it. This allows us to use
|
# If the Nix daemon is running, then use it. This allows us to use
|
||||||
# the latest Nix from Nixpkgs (below) for expression evaluation, while
|
# the latest Nix from Nixpkgs (below) for expression evaluation, while
|
||||||
# still using the old Nix (via the daemon) for actual store access.
|
# still using the old Nix (via the daemon) for actual store access.
|
||||||
|
@ -109,10 +113,10 @@ fi
|
||||||
# current one. Of course, the same goes for Nixpkgs, but Nixpkgs is
|
# current one. Of course, the same goes for Nixpkgs, but Nixpkgs is
|
||||||
# more conservative.
|
# more conservative.
|
||||||
if test -n "$buildNix"; then
|
if test -n "$buildNix"; then
|
||||||
if ! nix-build $NIXOS -A nixFallback -o $HOME/nix-tmp; then
|
if ! nix-build $NIXOS -A nixFallback -o $tmpDir/nix; then
|
||||||
nix-build $NIXPKGS -A nixUnstable -o $HOME/nix-tmp
|
nix-build $NIXPKGS -A nixUnstable -o $tmpDir/nix
|
||||||
fi
|
fi
|
||||||
PATH=$HOME/nix-tmp/bin:$PATH
|
PATH=$tmpDir/nix/bin:$PATH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -145,6 +149,3 @@ active system configuration may be garbage collected! This may render
|
||||||
the system inoperable (though a reboot will fix things).
|
the system inoperable (though a reboot will fix things).
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
rm -f $HOME/nix-tmp
|
|
||||||
|
|
Loading…
Reference in a new issue