From ad20a4a1c328967c7e4abe211f3dd63bb68bf966 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Thu, 5 Jul 2018 17:32:54 -0400 Subject: [PATCH] stage: add Linux checks This prevent us evaluation on macOS systems where pkgsMusl & pkgsi686Linux is unsupported. --- pkgs/top-level/stage.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix index 7b094c1c5ff..cc70950c497 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;