From 47406c64bc78a4dd75c551aa083224e70b79c56d Mon Sep 17 00:00:00 2001 From: Justinas Stankevicius Date: Sun, 27 Oct 2024 15:54:36 +0200 Subject: [PATCH] nixos-rebuild: fix --file with --build-host --- pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh index 1ab5c8346f33..d2163a66c75a 100755 --- a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh +++ b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh @@ -307,6 +307,10 @@ nixBuild() { esac done + if [[ -z $buildingAttribute ]]; then + instArgs+=("$buildFile") + fi + drv="$(runCmd nix-instantiate "${instArgs[@]}" "${extraBuildFlags[@]}")" if [ -a "$drv" ]; then logVerbose "Running nix-copy-closure with these NIX_SSHOPTS: $SSHOPTS"