From 17218f0bac909dc62bf9ed70238cbee62d9e44fd Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Sun, 3 Dec 2017 17:17:34 +0200 Subject: [PATCH] Make callPackage_i686 fail on on-x86 ...instead of silently producing an i686 derivation. --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1fc1f4581748..f549e571abe5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27,7 +27,9 @@ with pkgs; # Used by wine, firefox with debugging version of Flash, ... pkgsi686Linux = forceSystem "i686-linux" "i386"; - callPackage_i686 = pkgsi686Linux.callPackage; + callPackage_i686 = if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" + then pkgsi686Linux.callPackage + else throw "callPackage_i686 not supported on system '${stdenv.system}'"; # A stdenv capable of building 32-bit binaries. On x86_64-linux, # it uses GCC compiled with multilib support; on i686-linux, it's