Skip to content

Commit

Permalink
pkgsLinux: set crossSystem instead of localSystem
Browse files Browse the repository at this point in the history
As the doc implies, we should be using crossSystem to build *for* the
Linux platform natively instead of hoping that the system has a remote
builder or substituer with the right set of packages.

While this could be considered a breaking change, pkgsLinux attribute is
used exclusively for nixosTests and is a relatively new addition so
there shouldn’t be many external users that would be affected by this
change.
  • Loading branch information
tie committed Jun 6, 2024
1 parent eb71fe7 commit f58717b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/top-level/stage.nix
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ let
if stdenv.hostPlatform.isLinux
then self
else nixpkgsFun {
localSystem = lib.systems.elaborate "${stdenv.hostPlatform.parsed.cpu.name}-linux";
crossSystem = lib.systems.elaborate "${stdenv.hostPlatform.parsed.cpu.name}-linux";
};

# Extend the package set with zero or more overlays. This preserves
Expand Down

0 comments on commit f58717b

Please sign in to comment.