Make overrides of nodePackages work

Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
Shea Levy 2013-05-31 12:50:28 -04:00
parent 758f20f0b8
commit 210246266d
2 changed files with 23 additions and 24 deletions

View File

@ -1101,6 +1101,7 @@ let
nodePackages = recurseIntoAttrs (import ./node-packages.nix { nodePackages = recurseIntoAttrs (import ./node-packages.nix {
inherit pkgs stdenv nodejs fetchurl; inherit pkgs stdenv nodejs fetchurl;
neededNatives = [python] ++ lib.optional (lib.elem system lib.platforms.linux) utillinux; neededNatives = [python] ++ lib.optional (lib.elem system lib.platforms.linux) utillinux;
self = pkgs.nodePackages;
}); });
ldns = callPackage ../development/libraries/ldns { }; ldns = callPackage ../development/libraries/ldns { };

View File

@ -1,4 +1,4 @@
{ pkgs, stdenv, nodejs, fetchurl, neededNatives }: { pkgs, stdenv, nodejs, fetchurl, neededNatives, self }:
let let
inherit (self) buildNodePackage patchLatest; inherit (self) buildNodePackage patchLatest;
@ -24,8 +24,7 @@ let
} ] ++ full; } ] ++ full;
} ) { top-level = []; full = []; } generated; } ) { top-level = []; full = []; } generated;
in builtins.listToAttrs all.top-level // { full = builtins.listToAttrs all.full; }; in builtins.listToAttrs all.top-level // { full = builtins.listToAttrs all.full; };
in {
self = {
inherit importGeneratedPackages; inherit importGeneratedPackages;
nativeDeps = { nativeDeps = {
@ -49,5 +48,4 @@ let
''; '';
/* Put manual packages below here (ideally eventually managed by npm2nix */ /* Put manual packages below here (ideally eventually managed by npm2nix */
} // importGeneratedPackages (import ./node-packages-generated.nix) self.nativeDeps self; } // importGeneratedPackages (import ./node-packages-generated.nix) self.nativeDeps self
in self