diff options
Diffstat (limited to 'nixpkgs/pkgs/development/web/nodejs')
-rw-r--r-- | nixpkgs/pkgs/development/web/nodejs/disable-libatomic-darwin.patch | 11 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/web/nodejs/nodejs.nix | 26 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/web/nodejs/v10.nix | 4 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/web/nodejs/v11.nix | 10 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/web/nodejs/v12.nix | 8 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/web/nodejs/v13.nix | 10 |
6 files changed, 50 insertions, 19 deletions
diff --git a/nixpkgs/pkgs/development/web/nodejs/disable-libatomic-darwin.patch b/nixpkgs/pkgs/development/web/nodejs/disable-libatomic-darwin.patch new file mode 100644 index 000000000000..7ac6c2ef8953 --- /dev/null +++ b/nixpkgs/pkgs/development/web/nodejs/disable-libatomic-darwin.patch @@ -0,0 +1,11 @@ +--- a/node.gyp ++++ b/node.gyp +@@ -289,7 +289,7 @@ + '-Wl,-bnoerrmsg', + ], + }], +- ['OS in ("linux", "mac") and llvm_version != "0.0"', { ++ ['OS == "linux" and llvm_version != "0.0"', { + 'libraries': ['-latomic'], + }], + ], diff --git a/nixpkgs/pkgs/development/web/nodejs/nodejs.nix b/nixpkgs/pkgs/development/web/nodejs/nodejs.nix index 6dc68750075c..ea23ad06cd21 100644 --- a/nixpkgs/pkgs/development/web/nodejs/nodejs.nix +++ b/nixpkgs/pkgs/development/web/nodejs/nodejs.nix @@ -53,12 +53,30 @@ in }; buildInputs = optionals stdenv.isDarwin [ CoreServices ApplicationServices ] - ++ [ python2 zlib libuv openssl http-parser icu ]; + ++ [ zlib libuv openssl http-parser icu ]; - nativeBuildInputs = [ which utillinux pkgconfig ] + nativeBuildInputs = [ which utillinux pkgconfig python2 ] ++ optionals stdenv.isDarwin [ xcbuild ]; - configureFlags = sharedConfigureFlags ++ [ "--without-dtrace" ] ++ extraConfigFlags; + configureFlags = let + isCross = stdenv.hostPlatform != stdenv.buildPlatform; + host = stdenv.hostPlatform.platform; + isArm = stdenv.hostPlatform.isArm; + in sharedConfigureFlags ++ [ + "--without-dtrace" + ] ++ (optionals isCross [ + "--cross-compiling" + "--without-intl" + "--without-snapshot" + ]) ++ (optionals (isCross && isArm && hasAttr "fpu" host.gcc) [ + "--with-arm-fpu=${host.gcc.fpu}" + ]) ++ (optionals (isCross && isArm && hasAttr "float-abi" host.gcc) [ + "--with-arm-float-abi=${host.gcc.float-abi}" + ]) ++ (optionals (isCross && isArm) [ + "--dest-cpu=arm" + ]) ++ extraConfigFlags; + + configurePlatforms = []; dontDisableStatic = true; @@ -96,7 +114,7 @@ in postInstall = '' PATH=$out/bin:$PATH patchShebangs $out - ${optionalString enableNpm '' + ${optionalString (enableNpm && stdenv.hostPlatform == stdenv.buildPlatform) '' mkdir -p $out/share/bash-completion/completions/ $out/bin/npm completion > $out/share/bash-completion/completions/npm for dir in "$out/lib/node_modules/npm/man/"*; do diff --git a/nixpkgs/pkgs/development/web/nodejs/v10.nix b/nixpkgs/pkgs/development/web/nodejs/v10.nix index 939b065a55c2..a3b975e3718e 100644 --- a/nixpkgs/pkgs/development/web/nodejs/v10.nix +++ b/nixpkgs/pkgs/development/web/nodejs/v10.nix @@ -5,6 +5,6 @@ let in buildNodejs { inherit enableNpm; - version = "10.16.3"; - sha256 = "1gbblbmvx7a0wkgp3fs2pf5c1hymdpnfc7zqp1slg5hmfhyi5wbv"; + version = "10.18.0"; + sha256 = "1ppycqffsy7ix6whdp6id7ld1qizwvjlzxyk12kxw4wphjmn49hb"; } diff --git a/nixpkgs/pkgs/development/web/nodejs/v11.nix b/nixpkgs/pkgs/development/web/nodejs/v11.nix deleted file mode 100644 index 7b60a3772d3c..000000000000 --- a/nixpkgs/pkgs/development/web/nodejs/v11.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ callPackage, openssl, enableNpm ? true }: - -let - buildNodejs = callPackage ./nodejs.nix { inherit openssl; }; -in - buildNodejs { - inherit enableNpm; - version = "11.15.0"; - sha256 = "68a776c5d8b8b91a8f2adac2ca4ce4390ae1804883ec7ec9c0d6a6a64d306a76"; - } diff --git a/nixpkgs/pkgs/development/web/nodejs/v12.nix b/nixpkgs/pkgs/development/web/nodejs/v12.nix index ae74764384c6..8f84d24f70bd 100644 --- a/nixpkgs/pkgs/development/web/nodejs/v12.nix +++ b/nixpkgs/pkgs/development/web/nodejs/v12.nix @@ -1,10 +1,12 @@ -{ callPackage, openssl, icu, enableNpm ? true }: +{ stdenv, callPackage, openssl, icu, enableNpm ? true }: let buildNodejs = callPackage ./nodejs.nix { inherit openssl icu; }; in buildNodejs { inherit enableNpm; - version = "12.5.0"; - sha256 = "08haqs104lw44l92bxfii18sdn7y1k07cz3p0ni9bhw7kh4vf5c7"; + version = "12.14.1"; + sha256 = "1nvsivl496fgaypbk2pqqh7py29g7wsggyjlqydy1c0q4f24nyw7"; + + patches = stdenv.lib.optionals stdenv.isDarwin [ ./disable-libatomic-darwin.patch ]; } diff --git a/nixpkgs/pkgs/development/web/nodejs/v13.nix b/nixpkgs/pkgs/development/web/nodejs/v13.nix new file mode 100644 index 000000000000..1c32310a82d4 --- /dev/null +++ b/nixpkgs/pkgs/development/web/nodejs/v13.nix @@ -0,0 +1,10 @@ +{ callPackage, openssl, icu, enableNpm ? true }: + +let + buildNodejs = callPackage ./nodejs.nix { inherit openssl icu; }; +in + buildNodejs { + inherit enableNpm; + version = "13.6.0"; + sha256 = "0jf9nn5i1bijmrcgjvkp37fyz63lwwmxjh7nxipn2vw2qdx6ngsm"; + } |