summary refs log tree commit diff
path: root/pkgs/development/web/nodejs/nodejs.nix
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2021-10-14 09:03:13 +0300
committerDoron Behar <doron.behar@gmail.com>2021-10-14 09:03:13 +0300
commit869909603b7eed171ac1b45ade9f5f8aff3a76da (patch)
treef1388b32004acf4f4ac4f7e336a101ecf9f77819 /pkgs/development/web/nodejs/nodejs.nix
parentd00e06710c28752c3c2f3b7b02ca20e3e8968dd5 (diff)
nodejs: Add a .pkgs attribute
Diffstat (limited to 'pkgs/development/web/nodejs/nodejs.nix')
-rw-r--r--pkgs/development/web/nodejs/nodejs.nix13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix
index 0e52dd5f80407..0574bcf90824a 100644
--- a/pkgs/development/web/nodejs/nodejs.nix
+++ b/pkgs/development/web/nodejs/nodejs.nix
@@ -1,5 +1,7 @@
 { lib, stdenv, fetchurl, openssl, python, zlib, libuv, util-linux, http-parser
 , pkg-config, which
+# for `.pkgs` attribute
+, callPackage
 # Updater dependencies
 , writeScript, coreutils, gnugrep, jq, curl, common-updater-scripts, nix, runtimeShell
 , gnupg
@@ -40,9 +42,7 @@ let
       (builtins.attrNames sharedLibDeps);
 
   extraConfigFlags = optionals (!enableNpm) [ "--without-npm" ];
-in
-
-  stdenv.mkDerivation {
+  self = stdenv.mkDerivation {
     inherit version;
 
     name = "${baseName}-${version}";
@@ -83,6 +83,10 @@ in
 
     passthru.interpreterName = "nodejs";
 
+    passthru.pkgs = callPackage ../../node-packages/default.nix {
+      nodejs = self;
+    };
+
     setupHook = ./setup-hook.sh;
 
     pos = builtins.unsafeGetAttrPos "version" args;
@@ -146,4 +150,5 @@ in
     };
 
     passthru.python = python; # to ensure nodeEnv uses the same version
-}
+  };
+in self