summary refs log tree commit diff
path: root/pkgs/top-level/stage.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/top-level/stage.nix')
-rw-r--r--pkgs/top-level/stage.nix11
1 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix
index 7637371a40f..d0fb885dc74 100644
--- a/pkgs/top-level/stage.nix
+++ b/pkgs/top-level/stage.nix
@@ -134,13 +134,16 @@ let
     # default GNU libc on Linux systems. Non-Linux systems are not
     # supported.
     pkgsMusl = if stdenv.hostPlatform.isLinux then nixpkgsFun {
-      localSystem = {
+      inherit overlays config;
+      ${if stdenv.hostPlatform == stdenv.buildPlatform
+        then "localSystem" else "crossSystem"} = {
         parsed = stdenv.hostPlatform.parsed // {
           abi = {
             "gnu" = lib.systems.parse.abis.musl;
             "gnueabi" = lib.systems.parse.abis.musleabi;
             "gnueabihf" = lib.systems.parse.abis.musleabihf;
-          }.${stdenv.hostPlatform.parsed.abi.name} or lib.systems.parse.abis.musl;
+          }.${stdenv.hostPlatform.parsed.abi.name}
+            or lib.systems.parse.abis.musl;
         };
       };
     } else throw "Musl libc only supports Linux systems.";
@@ -148,7 +151,9 @@ let
     # All packages built for i686 Linux.
     # Used by wine, firefox with debugging version of Flash, ...
     pkgsi686Linux = assert stdenv.hostPlatform.isLinux; nixpkgsFun {
-      localSystem = {
+      inherit overlays config;
+      ${if stdenv.hostPlatform == stdenv.buildPlatform
+        then "localSystem" else "crossSystem"} = {
         parsed = stdenv.hostPlatform.parsed // {
           cpu = lib.systems.parse.cpuTypes.i686;
         };