summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2018-07-05 17:32:54 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2018-07-05 17:32:54 -0400
commitad20a4a1c328967c7e4abe211f3dd63bb68bf966 (patch)
tree1d4f738ff911dd2f93944c49884984f4be2bdbfb /pkgs
parentf795ed79d026aafdc21685a99b762beb807a70a7 (diff)
downloadnixlib-ad20a4a1c328967c7e4abe211f3dd63bb68bf966.tar
nixlib-ad20a4a1c328967c7e4abe211f3dd63bb68bf966.tar.gz
nixlib-ad20a4a1c328967c7e4abe211f3dd63bb68bf966.tar.bz2
nixlib-ad20a4a1c328967c7e4abe211f3dd63bb68bf966.tar.lz
nixlib-ad20a4a1c328967c7e4abe211f3dd63bb68bf966.tar.xz
nixlib-ad20a4a1c328967c7e4abe211f3dd63bb68bf966.tar.zst
nixlib-ad20a4a1c328967c7e4abe211f3dd63bb68bf966.zip
stage: add Linux checks
This prevent us evaluation on macOS systems where pkgsMusl &
pkgsi686Linux is unsupported.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/top-level/stage.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix
index 7b094c1c5ffd..cc70950c497c 100644
--- a/pkgs/top-level/stage.nix
+++ b/pkgs/top-level/stage.nix
@@ -137,7 +137,7 @@ let
     # All packages built with the Musl libc. This will override the
     # default GNU libc on Linux systems. Non-Linux systems are not
     # supported.
-    pkgsMusl = nixpkgsFun {
+    pkgsMusl = if stdenv.hostPlatform.isLinux then nixpkgsFun {
       localSystem = {
         parsed = stdenv.hostPlatform.parsed // {
           abi = {
@@ -147,11 +147,11 @@ let
           }.${stdenv.hostPlatform.parsed.abi.name} or lib.systems.parse.abis.musl;
         };
       };
-    };
+    } else throw "Musl libc only supports Linux systems.";
 
     # All packages built for i686 Linux.
     # Used by wine, firefox with debugging version of Flash, ...
-    pkgsi686Linux = nixpkgsFun {
+    pkgsi686Linux = assert stdenv.hostPlatform.isLinux; nixpkgsFun {
       localSystem = {
         parsed = stdenv.hostPlatform.parsed // {
           cpu = lib.systems.parse.cpuTypes.i686;