Merge pull request #19980 from cko/cleanup_node_packages
node-packages: update & cleanup
This commit is contained in:
commit
dc04a8e49d
|
@ -10,7 +10,7 @@ let
|
||||||
inherit nodejs;
|
inherit nodejs;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
import ./node-packages-v5.nix {
|
import ./node-packages-v6.nix {
|
||||||
inherit (pkgs) fetchurl fetchgit;
|
inherit (pkgs) fetchurl fetchgit;
|
||||||
inherit nodeEnv;
|
inherit nodeEnv;
|
||||||
}
|
}
|
|
@ -1,33 +0,0 @@
|
||||||
{pkgs, system, nodejs}:
|
|
||||||
|
|
||||||
let
|
|
||||||
nodePackages = import ./composition-v4.nix {
|
|
||||||
inherit pkgs system nodejs;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
nodePackages // {
|
|
||||||
node-inspector = nodePackages.node-inspector.override (oldAttrs: {
|
|
||||||
buildInputs = oldAttrs.buildInputs ++ [ nodePackages.node-pre-gyp ];
|
|
||||||
});
|
|
||||||
|
|
||||||
phantomjs = nodePackages.phantomjs.override (oldAttrs: {
|
|
||||||
buildInputs = oldAttrs.buildInputs ++ [ pkgs.phantomjs ];
|
|
||||||
});
|
|
||||||
|
|
||||||
webdrvr = nodePackages.webdrvr.override (oldAttrs: {
|
|
||||||
buildInputs = oldAttrs.buildInputs ++ [ pkgs.phantomjs ];
|
|
||||||
|
|
||||||
preRebuild = ''
|
|
||||||
mkdir $TMPDIR/webdrvr
|
|
||||||
|
|
||||||
ln -s ${pkgs.fetchurl {
|
|
||||||
url = "https://selenium-release.storage.googleapis.com/2.43/selenium-server-standalone-2.43.1.jar";
|
|
||||||
sha1 = "ef1b5f8ae9c99332f99ba8794988a1d5b974d27b";
|
|
||||||
}} $TMPDIR/webdrvr/selenium-server-standalone-2.43.1.jar
|
|
||||||
ln -s ${pkgs.fetchurl {
|
|
||||||
url = "http://chromedriver.storage.googleapis.com/2.10/chromedriver_linux64.zip";
|
|
||||||
sha1 = "26220f7e43ee3c0d714860db61c4d0ecc9bb3d89";
|
|
||||||
}} $TMPDIR/webdrvr/chromedriver_linux64.zip
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
{pkgs, system, nodejs}:
|
|
||||||
|
|
||||||
let
|
|
||||||
nodePackages = import ./composition-v5.nix {
|
|
||||||
inherit pkgs system nodejs;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
nodePackages // {
|
|
||||||
node-inspector = nodePackages.node-inspector.override (oldAttrs: {
|
|
||||||
buildInputs = oldAttrs.buildInputs ++ [ nodePackages.node-pre-gyp ];
|
|
||||||
});
|
|
||||||
|
|
||||||
phantomjs = nodePackages.phantomjs.override (oldAttrs: {
|
|
||||||
buildInputs = oldAttrs.buildInputs ++ [ pkgs.phantomjs2 ];
|
|
||||||
});
|
|
||||||
|
|
||||||
webdrvr = nodePackages.webdrvr.override (oldAttrs: {
|
|
||||||
buildInputs = oldAttrs.buildInputs ++ [ pkgs.phantomjs ];
|
|
||||||
|
|
||||||
preRebuild = ''
|
|
||||||
mkdir $TMPDIR/webdrvr
|
|
||||||
|
|
||||||
ln -s ${pkgs.fetchurl {
|
|
||||||
url = "https://selenium-release.storage.googleapis.com/2.43/selenium-server-standalone-2.43.1.jar";
|
|
||||||
sha1 = "ef1b5f8ae9c99332f99ba8794988a1d5b974d27b";
|
|
||||||
}} $TMPDIR/webdrvr/selenium-server-standalone-2.43.1.jar
|
|
||||||
ln -s ${pkgs.fetchurl {
|
|
||||||
url = "http://chromedriver.storage.googleapis.com/2.10/chromedriver_linux64.zip";
|
|
||||||
sha1 = "26220f7e43ee3c0d714860db61c4d0ecc9bb3d89";
|
|
||||||
}} $TMPDIR/webdrvr/chromedriver_linux64.zip
|
|
||||||
'';
|
|
||||||
|
|
||||||
dontNpmInstall = true; # We face an error with underscore not found, but the package will work fine if we ignore this.
|
|
||||||
});
|
|
||||||
|
|
||||||
bower2nix = nodePackages.bower2nix.override (oldAttrs: {
|
|
||||||
buildInputs = oldAttrs.buildInputs ++ [ pkgs.makeWrapper ];
|
|
||||||
postInstall = ''
|
|
||||||
for prog in bower2nix fetch-bower; do
|
|
||||||
wrapProgram "$out/bin/$prog" --prefix PATH : "${pkgs.git}/bin"
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
{pkgs, system, nodejs}:
|
{pkgs, system, nodejs}:
|
||||||
|
|
||||||
let
|
let
|
||||||
nodePackages = import ./composition-v5.nix {
|
nodePackages = import ./composition-v6.nix {
|
||||||
inherit pkgs system nodejs;
|
inherit pkgs system nodejs;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
|
@ -2,4 +2,5 @@
|
||||||
|
|
||||||
rm -f node-env.nix
|
rm -f node-env.nix
|
||||||
node2nix -i node-packages.json -o node-packages-v4.nix -c composition-v4.nix
|
node2nix -i node-packages.json -o node-packages-v4.nix -c composition-v4.nix
|
||||||
node2nix -5 -i node-packages.json -o node-packages-v5.nix -c composition-v5.nix
|
# node2nix doesn't explicitely support node v6 so far
|
||||||
|
node2nix -5 -i node-packages.json -o node-packages-v6.nix -c composition-v6.nix
|
||||||
|
|
|
@ -121,7 +121,7 @@ let
|
||||||
if [ -f "${src}" ]
|
if [ -f "${src}" ]
|
||||||
then
|
then
|
||||||
# Figure out what directory has been unpacked
|
# Figure out what directory has been unpacked
|
||||||
packageDir="$(find . -type d -maxdepth 1 | tail -1)"
|
packageDir=$(find . -type d -maxdepth 1 | tail -1)
|
||||||
|
|
||||||
# Restore write permissions to make building work
|
# Restore write permissions to make building work
|
||||||
find "$packageDir" -type d -print0 | xargs -0 chmod u+x
|
find "$packageDir" -type d -print0 | xargs -0 chmod u+x
|
||||||
|
@ -131,8 +131,6 @@ let
|
||||||
mv "$packageDir" "$DIR/${packageName}"
|
mv "$packageDir" "$DIR/${packageName}"
|
||||||
elif [ -d "${src}" ]
|
elif [ -d "${src}" ]
|
||||||
then
|
then
|
||||||
strippedName="$(stripHash ${src})"
|
|
||||||
|
|
||||||
# Restore write permissions to make building work
|
# Restore write permissions to make building work
|
||||||
chmod -R u+w $strippedName
|
chmod -R u+w $strippedName
|
||||||
|
|
||||||
|
@ -140,6 +138,9 @@ let
|
||||||
mv $strippedName "$DIR/${packageName}"
|
mv $strippedName "$DIR/${packageName}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Unset the stripped name to not confuse the next unpack step
|
||||||
|
unset strippedName
|
||||||
|
|
||||||
# Some version specifiers (latest, unstable, URLs, file paths) force NPM to make remote connections or consult paths outside the Nix store.
|
# Some version specifiers (latest, unstable, URLs, file paths) force NPM to make remote connections or consult paths outside the Nix store.
|
||||||
# The following JavaScript replaces these by * to prevent that
|
# The following JavaScript replaces these by * to prevent that
|
||||||
cd "$DIR/${packageName}"
|
cd "$DIR/${packageName}"
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -2431,7 +2431,7 @@ in
|
||||||
libtool = darwin.cctools;
|
libtool = darwin.cctools;
|
||||||
};
|
};
|
||||||
|
|
||||||
nodejs = nodejs-4_x;
|
nodejs = nodejs-6_x;
|
||||||
|
|
||||||
nodePackages_6_x = callPackage ../development/node-packages/default-v6.nix {
|
nodePackages_6_x = callPackage ../development/node-packages/default-v6.nix {
|
||||||
nodejs = pkgs.nodejs-6_x;
|
nodejs = pkgs.nodejs-6_x;
|
||||||
|
|
Loading…
Reference in New Issue