mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 07:01:54 +00:00
nixos-rebuild: Don't build nixos-rebuild with --fast
This commit is contained in:
parent
23fee8bfbd
commit
2000f0941e
@ -15,6 +15,7 @@ origArgs=("$@")
|
||||
extraBuildFlags=()
|
||||
action=
|
||||
buildNix=1
|
||||
fast=
|
||||
rollback=
|
||||
upgrade=
|
||||
repair=
|
||||
@ -66,6 +67,7 @@ while [ "$#" -gt 0 ]; do
|
||||
;;
|
||||
--fast)
|
||||
buildNix=
|
||||
fast=1
|
||||
extraBuildFlags+=(--show-trace)
|
||||
;;
|
||||
--profile-name|-p)
|
||||
@ -217,7 +219,7 @@ if [ -z "$_NIXOS_REBUILD_REEXEC" ]; then
|
||||
fi
|
||||
|
||||
# Re-execute nixos-rebuild from the Nixpkgs tree.
|
||||
if [ -z "$_NIXOS_REBUILD_REEXEC" -a -n "$canRun" ]; then
|
||||
if [ -z "$_NIXOS_REBUILD_REEXEC" -a -n "$canRun" -a -z "$fast" ]; then
|
||||
if p=$(nix-build --no-out-link --expr 'with import <nixpkgs/nixos> {}; config.system.build.nixos-rebuild' "${extraBuildFlags[@]}"); then
|
||||
export _NIXOS_REBUILD_REEXEC=1
|
||||
exec $p/bin/nixos-rebuild "${origArgs[@]}"
|
||||
|
Loading…
Reference in New Issue
Block a user