diff options
author | Jared Baur <jaredbaur@fastmail.com> | 2023-05-04 20:09:16 -0700 |
---|---|---|
committer | Jared Baur <jaredbaur@fastmail.com> | 2023-05-04 20:09:16 -0700 |
commit | 67561dcc59607fe521d4dd10a70043e13c85a2e3 (patch) | |
tree | 646e0187d37ceb8fa37ab98054838fac667e57b2 /nixos/modules/system/activation/bootspec.nix | |
parent | fed0618057e5714b2eb0b88bedbe671ce057a41a (diff) |
nixos/bootspec: Fix cross for nixos-system systemBuilder
When `nixpkgs.hostPlatform` != `nixpkgs.buildPlatform`, building the top-level attribute fails since the bootspec portion of the system builder tries to reference the host platform's `jq`. Change this to reference the build platform's `jq`.
Diffstat (limited to 'nixos/modules/system/activation/bootspec.nix')
-rw-r--r-- | nixos/modules/system/activation/bootspec.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/system/activation/bootspec.nix b/nixos/modules/system/activation/bootspec.nix index 677bd562d1706..9e1fa309d5db0 100644 --- a/nixos/modules/system/activation/bootspec.nix +++ b/nixos/modules/system/activation/bootspec.nix @@ -40,7 +40,7 @@ let # This can only be done here because we *cannot* depend on $out # referring to the toplevel, except by living in the toplevel itself. toplevelInjector = lib.escapeShellArgs [ - "${pkgs.jq}/bin/jq" + "${pkgs.buildPackages.jq}/bin/jq" '' ."org.nixos.bootspec.v1".toplevel = $toplevel | ."org.nixos.bootspec.v1".init = $init @@ -60,7 +60,7 @@ let children); in lib.escapeShellArgs [ - "${pkgs.jq}/bin/jq" + "${pkgs.buildPackages.jq}/bin/jq" "--sort-keys" ''."org.nixos.specialisation.v1" = ($ARGS.named | map_values(. | first))'' ] + " ${lib.concatStringsSep " " specialisationLoader}"; |