3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #84599 from doronbehar/nodejs-python3

nodejs: use python3 if possible
This commit is contained in:
Mario Rodas 2020-04-13 07:44:05 -05:00 committed by GitHub
commit 66e43c6588
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 11 deletions

View file

@ -13,7 +13,14 @@ in
programs.npm = {
enable = mkEnableOption "<command>npm</command> global config";
npmrc = lib.mkOption {
package = mkOption {
type = types.path;
description = "The npm package version / flavor to use";
default = pkgs.nodePackages.npm;
example = literalExample "pkgs.nodePackages_13_x.npm";
};
npmrc = mkOption {
type = lib.types.lines;
description = ''
The system-wide npm configuration.
@ -40,7 +47,7 @@ in
environment.variables.NPM_CONFIG_GLOBALCONFIG = "/etc/npmrc";
environment.systemPackages = [ pkgs.nodePackages.npm ];
environment.systemPackages = [ cfg.package ];
};
}

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, openssl, python2, zlib, libuv, utillinux, http-parser
{ stdenv, fetchurl, openssl, python, zlib, libuv, utillinux, http-parser
, pkgconfig, which
# Updater dependencies
, writeScript, coreutils, gnugrep, jq, curl, common-updater-scripts, nix, runtimeShell
@ -55,7 +55,7 @@ in
buildInputs = optionals stdenv.isDarwin [ CoreServices ApplicationServices ]
++ [ zlib libuv openssl http-parser icu ];
nativeBuildInputs = [ which utillinux pkgconfig python2 ]
nativeBuildInputs = [ which utillinux pkgconfig python ]
++ optionals stdenv.isDarwin [ xcbuild ];
configureFlags = let
@ -145,5 +145,5 @@ in
platforms = platforms.linux ++ platforms.darwin;
};
passthru.python = python2; # to ensure nodeEnv uses the same version
passthru.python = python; # to ensure nodeEnv uses the same version
}

View file

@ -1,7 +1,10 @@
{ callPackage, openssl, enableNpm ? true }:
{ callPackage, openssl, icu, python2, enableNpm ? true }:
let
buildNodejs = callPackage ./nodejs.nix { inherit openssl; };
buildNodejs = callPackage ./nodejs.nix {
inherit openssl icu;
python = python2;
};
in
buildNodejs {
inherit enableNpm;

View file

@ -1,7 +1,10 @@
{ callPackage, openssl, icu, enableNpm ? true }:
{ callPackage, openssl, icu, python2, enableNpm ? true }:
let
buildNodejs = callPackage ./nodejs.nix { inherit openssl icu; };
buildNodejs = callPackage ./nodejs.nix {
inherit openssl icu;
python = python2;
};
in
buildNodejs {
inherit enableNpm;

View file

@ -1,7 +1,10 @@
{ callPackage, openssl, icu, enableNpm ? true }:
{ callPackage, openssl, icu, python3, enableNpm ? true }:
let
buildNodejs = callPackage ./nodejs.nix { inherit openssl icu; };
buildNodejs = callPackage ./nodejs.nix {
inherit openssl icu;
python = python3;
};
in
buildNodejs {
inherit enableNpm;