mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-19 02:44:17 +03:00
nixos-rebuild: fix creating ./result symlink for flakes
This commit is contained in:
parent
0e98d7acab
commit
ff3b3e696a
7
pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh
Normal file → Executable file
7
pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh
Normal file → Executable file
@ -210,7 +210,12 @@ nixBuild() {
|
||||
}
|
||||
|
||||
nixFlakeBuild() {
|
||||
if [ -z "$buildHost" ]; then
|
||||
if [[ -z "$buildHost" && -z "$targetHost" ]] &&
|
||||
! [ "$action" = switch -o "$action" = boot ]
|
||||
then
|
||||
nix "${flakeFlags[@]}" build "$@"
|
||||
readlink -f ./result
|
||||
elif [ -z "$buildHost" ]; then
|
||||
nix "${flakeFlags[@]}" build "$@" --out-link "${tmpDir}/result"
|
||||
readlink -f "${tmpDir}/result"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user