diff options
author | Mathias Schreck <schreck.mathias@googlemail.com> | 2018-10-23 21:22:50 +0200 |
---|---|---|
committer | Stefan Lau <github@stefanlau.com> | 2018-12-21 11:23:49 +0100 |
commit | e6a86e65d94ecbec0ec72901d542d1506101fa53 (patch) | |
tree | ab4cfe22f2f4de82ce14c714ee92257269220f56 /pkgs/development/web/nodejs/nodejs.nix | |
parent | b3ad548f0b0e10ba9969e40962ad9839ba404fa5 (diff) |
nodejs-11_x: init at 11.5.0
Diffstat (limited to 'pkgs/development/web/nodejs/nodejs.nix')
-rw-r--r-- | pkgs/development/web/nodejs/nodejs.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix index a9c08e1c5b732..c0ba92ad44171 100644 --- a/pkgs/development/web/nodejs/nodejs.nix +++ b/pkgs/development/web/nodejs/nodejs.nix @@ -12,12 +12,16 @@ with stdenv.lib; { enableNpm ? true, version, sha256, patches ? [] } @args: let - inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices; + majorVersion = versions.major version; + minorVersion = versions.minor version; + baseName = if enableNpm then "nodejs" else "nodejs-slim"; - sharedLibDeps = { inherit openssl zlib libuv; } // (optionalAttrs (!stdenv.isDarwin) { inherit http-parser; }); + useSharedHttpParser = !stdenv.isDarwin && versionOlder "${majorVersion}.${minorVersion}" "11.4"; + + sharedLibDeps = { inherit openssl zlib libuv; } // (optionalAttrs useSharedHttpParser { inherit http-parser; }); sharedConfigureFlags = concatMap (name: [ "--shared-${name}" @@ -103,7 +107,7 @@ in passthru.updateScript = import ./update.nix { inherit stdenv writeScript coreutils gnugrep jq curl common-updater-scripts gnupg nix; inherit (stdenv) lib; - majorVersion = with stdenv.lib; elemAt (splitString "." version) 0; + inherit majorVersion; }; meta = { |