nixos-rebuild: fix creating ./result symlink for flakes
This commit is contained in:
committed by
Jonathan Ringer
parent
0e98d7acab
commit
ff3b3e696a
Regular → Executable
+6
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user