Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nodejs: refactor generic build function
This removes some duplicated and dead code across the different versions of nodejs.
- Loading branch information
Showing
6 changed files
with
56 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,11 @@ | ||
{ stdenv, fetchurl, openssl, python2, zlib, libuv, v8, utillinux, http-parser | ||
, pkgconfig, runCommand, which, libtool, fetchpatch | ||
, callPackage | ||
, darwin ? null | ||
, enableNpm ? true | ||
}@args: | ||
{ stdenv, callPackage, lib, enableNpm ? true }: | ||
|
||
let | ||
nodejs = import ./nodejs.nix args; | ||
baseName = if enableNpm then "nodejs" else "nodejs-slim"; | ||
buildNodejs = callPackage ./nodejs.nix {}; | ||
in | ||
stdenv.mkDerivation (nodejs // rec { | ||
buildNodejs { | ||
inherit enableNpm; | ||
version = "4.8.5"; | ||
name = "${baseName}-${version}"; | ||
src = fetchurl { | ||
url = "http://nodejs.org/dist/v${version}/node-v${version}.tar.xz"; | ||
sha256 = "0lqdnnihmc2wpl1v1shj60i49wka2354b00a86k0xbjg5gyfx2m4"; | ||
}; | ||
|
||
}) | ||
sha256 = "0lqdnnihmc2wpl1v1shj60i49wka2354b00a86k0xbjg5gyfx2m4"; | ||
patches = lib.optionals stdenv.isDarwin [ ./no-xcode.patch ]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,11 @@ | ||
{ stdenv, fetchurl, openssl, python2, zlib, libuv, v8, utillinux, http-parser | ||
, pkgconfig, runCommand, which, libtool, fetchpatch | ||
, callPackage | ||
, darwin ? null | ||
, enableNpm ? true | ||
}@args: | ||
{ stdenv, callPackage, lib, enableNpm ? true }: | ||
|
||
let | ||
nodejs = import ./nodejs.nix args; | ||
baseName = if enableNpm then "nodejs" else "nodejs-slim"; | ||
buildNodejs = callPackage ./nodejs.nix {}; | ||
in | ||
stdenv.mkDerivation (nodejs // rec { | ||
buildNodejs { | ||
inherit enableNpm; | ||
version = "6.11.5"; | ||
name = "${baseName}-${version}"; | ||
src = fetchurl { | ||
url = "https://nodejs.org/download/release/v${version}/node-v${version}.tar.xz"; | ||
sha256 = "1bwakrvy0if5spbymwpb05qwrb47xwzlnc42rapgp6b744ay8v8w"; | ||
}; | ||
}) | ||
sha256 = "1bwakrvy0if5spbymwpb05qwrb47xwzlnc42rapgp6b744ay8v8w"; | ||
patches = lib.optionals stdenv.isDarwin [ ./no-xcode.patch ]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,11 @@ | ||
{ stdenv, fetchurl, openssl, python2, zlib, libuv, v8, utillinux, http-parser | ||
, pkgconfig, runCommand, which, libtool, fetchpatch | ||
, callPackage | ||
, darwin ? null | ||
, enableNpm ? true | ||
}@args: | ||
{ stdenv, callPackage, lib, enableNpm ? true }: | ||
|
||
let | ||
nodejs = import ./nodejs.nix args; | ||
baseName = if enableNpm then "nodejs" else "nodejs-slim"; | ||
buildNodejs = callPackage ./nodejs.nix {}; | ||
in | ||
stdenv.mkDerivation (nodejs // rec { | ||
buildNodejs { | ||
inherit enableNpm; | ||
version = "8.9.0"; | ||
name = "${baseName}-${version}"; | ||
src = fetchurl { | ||
url = "https://nodejs.org/download/release/v${version}/node-v${version}.tar.xz"; | ||
sha256 = "128ir6rkdz1xj55hbflw0sh7snrrvjwgvxmgnka7cyhjkvw5i0mf"; | ||
}; | ||
|
||
patches = stdenv.lib.optionals stdenv.isDarwin [ ./no-xcode-v7.patch ]; | ||
}) | ||
sha256 = "128ir6rkdz1xj55hbflw0sh7snrrvjwgvxmgnka7cyhjkvw5i0mf"; | ||
patches = lib.optionals stdenv.isDarwin [ ./no-xcode-v7.patch ]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,11 @@ | ||
{ stdenv, fetchurl, openssl, python2, zlib, libuv, v8, utillinux, http-parser | ||
, pkgconfig, runCommand, which, libtool, fetchpatch | ||
, callPackage | ||
, darwin ? null | ||
, enableNpm ? true | ||
}@args: | ||
{ stdenv, callPackage, lib, enableNpm ? true }: | ||
|
||
let | ||
nodejs = import ./nodejs.nix args; | ||
baseName = if enableNpm then "nodejs" else "nodejs-slim"; | ||
buildNodejs = callPackage ./nodejs.nix {}; | ||
in | ||
stdenv.mkDerivation (nodejs // rec { | ||
buildNodejs { | ||
inherit enableNpm; | ||
version = "9.0.0"; | ||
name = "${baseName}-${version}"; | ||
src = fetchurl { | ||
url = "https://nodejs.org/download/release/v${version}/node-v${version}.tar.xz"; | ||
sha256 = "19az7mxcb3d1aj0f7gvhriyyghn1rwn0425924pa84d6j1mbsljv"; | ||
}; | ||
|
||
patches = stdenv.lib.optionals stdenv.isDarwin [ ./no-xcode-v7.patch ]; | ||
}) | ||
sha256 = "19az7mxcb3d1aj0f7gvhriyyghn1rwn0425924pa84d6j1mbsljv"; | ||
patches = lib.optionals stdenv.isDarwin [ ./no-xcode-v7.patch ]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters