about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2021-11-04 14:15:00 +0000
committerGitHub <noreply@github.com>2021-11-04 14:15:00 +0000
commit7cb82625b086d04cf5c40c964b6efd9e30125814 (patch)
treec1bbf98b277ebaf8e4866c006ffbe557a995be91
parentef7975c6072067a4808dc15c27ab584fd5e45fc5 (diff)
parent869909603b7eed171ac1b45ade9f5f8aff3a76da (diff)
downloadnixlib-7cb82625b086d04cf5c40c964b6efd9e30125814.tar
nixlib-7cb82625b086d04cf5c40c964b6efd9e30125814.tar.gz
nixlib-7cb82625b086d04cf5c40c964b6efd9e30125814.tar.bz2
nixlib-7cb82625b086d04cf5c40c964b6efd9e30125814.tar.lz
nixlib-7cb82625b086d04cf5c40c964b6efd9e30125814.tar.xz
nixlib-7cb82625b086d04cf5c40c964b6efd9e30125814.tar.zst
nixlib-7cb82625b086d04cf5c40c964b6efd9e30125814.zip
Merge pull request #141604 from doronbehar/pkg/nodePackages/pkgsAttr
-rw-r--r--pkgs/development/web/nodejs/nodejs.nix13
-rw-r--r--pkgs/top-level/all-packages.nix8
2 files changed, 11 insertions, 10 deletions
diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix
index 7b88b0f8fd37..3f0f0e78e07a 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;
@@ -147,4 +151,5 @@ in
     };
 
     passthru.python = python; # to ensure nodeEnv uses the same version
-}
+  };
+in self
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 722e956e8313..761d1b8e3177 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7085,13 +7085,9 @@ with pkgs;
   nodejs_latest = nodejs-16_x;
   nodejs-slim_latest = nodejs-slim-16_x;
 
-  nodePackages_latest = dontRecurseIntoAttrs (callPackage ../development/node-packages/default.nix {
-    nodejs = nodejs_latest;
-  });
+  nodePackages_latest = dontRecurseIntoAttrs nodejs_latest.pkgs;
 
-  nodePackages = dontRecurseIntoAttrs (callPackage ../development/node-packages/default.nix {
-    inherit nodejs;
-  });
+  nodePackages = dontRecurseIntoAttrs nodejs.pkgs;
 
   np2kai = callPackage ../misc/emulators/np2kai { };