From 2762b0667dfd0fe7cb5828b9246094ed9815e80a Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Sat, 27 Jul 2013 13:33:18 -0400 Subject: [PATCH] node-packages.nix: Actually use nativeDeps Wonder how long that's been broken... Signed-off-by: Shea Levy --- pkgs/top-level/node-packages.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/node-packages.nix b/pkgs/top-level/node-packages.nix index 206dd1c87ce8..5719967c4c5c 100644 --- a/pkgs/top-level/node-packages.nix +++ b/pkgs/top-level/node-packages.nix @@ -5,6 +5,15 @@ let importGeneratedPackages = generated: nativeDeps: self: let + nativeDepsList = { name, spec, ... }: + let + nameOr = if builtins.hasAttr name nativeDeps + then builtins.getAttr name nativeDeps + else {}; + depsOr = if builtins.hasAttr spec nameOr + then builtins.getAttr spec nameOr + else []; + in depsOr; all = pkgs.lib.fold (pkg: { top-level, full }: { top-level = top-level ++ pkgs.lib.optional pkg.topLevel { name = pkg.name; @@ -25,6 +34,7 @@ let sha256 = pkg.sha256 or ""; }; deps = map (dep: builtins.getAttr dep.spec (builtins.getAttr dep.name self.full)) pkg.dependencies; + buildInputs = nativeDepsList pkg; }; } ]; } ]; @@ -34,8 +44,8 @@ in { inherit importGeneratedPackages; nativeDeps = { - "node-expat-*" = [ pkgs.expat ]; - "rbytes-0.0.2" = [ pkgs.openssl ]; + "node-expat"."*" = [ pkgs.expat ]; + "rbytes"."0.0.2" = [ pkgs.openssl ]; }; buildNodePackage = import ../development/web/nodejs/build-node-package.nix {