diff options
author | Yury G. Kudryashov <urkud.urkud@gmail.com> | 2011-09-11 12:41:47 +0000 |
---|---|---|
committer | Yury G. Kudryashov <urkud.urkud@gmail.com> | 2011-09-11 12:41:47 +0000 |
commit | c56a8456edf076d0ff4f82e21a997dd32fe8926a (patch) | |
tree | f6bf834cabb5ac42fe96439be316a6494051fe6e /modules/misc/nixpkgs.nix | |
parent | 9a096c9ee745fafa076188dd89958dd52f976ae7 (diff) | |
download | nixpkgs-c56a8456edf076d0ff4f82e21a997dd32fe8926a.tar nixpkgs-c56a8456edf076d0ff4f82e21a997dd32fe8926a.tar.gz nixpkgs-c56a8456edf076d0ff4f82e21a997dd32fe8926a.tar.bz2 nixpkgs-c56a8456edf076d0ff4f82e21a997dd32fe8926a.tar.lz nixpkgs-c56a8456edf076d0ff4f82e21a997dd32fe8926a.tar.xz nixpkgs-c56a8456edf076d0ff4f82e21a997dd32fe8926a.tar.zst nixpkgs-c56a8456edf076d0ff4f82e21a997dd32fe8926a.zip |
Allow full ~/.nixpkgs/config.nix syntax in nixpkgs.config
Namely, allow {pkgs}: { packageOverrides = p: ...; }; svn path=/nixos/trunk/; revision=29180
Diffstat (limited to 'modules/misc/nixpkgs.nix')
-rw-r--r-- | modules/misc/nixpkgs.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/misc/nixpkgs.nix b/modules/misc/nixpkgs.nix index 78c52bca201..73332bd96a8 100644 --- a/modules/misc/nixpkgs.nix +++ b/modules/misc/nixpkgs.nix @@ -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: |