nodejs: Add a .pkgs attribute

main
Doron Behar 3 years ago
parent d00e06710c
commit 869909603b
  1. 13
      pkgs/development/web/nodejs/nodejs.nix
  2. 8
      pkgs/top-level/all-packages.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

@ -6873,13 +6873,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 { };

Loading…
Cancel
Save