Allow full ~/.nixpkgs/config.nix syntax in nixpkgs.config

Namely, allow {pkgs}: { packageOverrides = p: ...; };

svn path=/nixos/trunk/; revision=29180
This commit is contained in:
Yury G. Kudryashov 2011-09-11 12:41:47 +00:00
parent 9a096c9ee7
commit c56a8456ed

View file

@ -11,7 +11,11 @@ let
then f x
else f;
mergeConfig = lhs: rhs:
mergeConfig = lhs_: rhs_:
let
lhs = optCall lhs_ { inherit pkgs; };
rhs = optCall rhs_ { inherit pkgs; };
in
lhs // rhs //
optionalAttrs (lhs ? packageOverrides) {
packageOverrides = pkgs: