From 089ee5da114520b775e9d17d7c456356966c97dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sun, 8 Aug 2010 17:26:30 +0000 Subject: [PATCH] Fix the cross-building of packages mentioned in stdenvLinux.overrides. svn path=/nixpkgs/trunk/; revision=23038 --- pkgs/top-level/all-packages.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b4a4f07684f..e6aef60783d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -93,8 +93,12 @@ let # (un-overriden) set of packages, allowing packageOverrides # attributes to refer to the original attributes (e.g. "foo = # ... pkgs.foo ..."). + # We don't want stdenv overrides in the case of cross-building, or + # otherwise the basic overrided packages will not be built with the + # crossStdenv adapter. overrides = (getConfig ["packageOverrides"] (pkgs: {})) pkgsOrig // - (if pkgsOrig.stdenv ? overrides then pkgsOrig.stdenv.overrides else { }); + (if (pkgsOrig.stdenv ? overrides && crossSystem == null) + then pkgsOrig.stdenv.overrides else { }); pkgsOrig = pkgsFun {}; # the un-overriden packages, passed to packageOverrides pkgs = pkgsFun overrides; # the overriden, final packages