From 182b1c277797a6b3ae10c752314e80e98a17d61e Mon Sep 17 00:00:00 2001 From: Christine Koppelt Date: Sat, 29 Oct 2016 23:08:01 +0200 Subject: [PATCH] node-packages: update & cleanup * update packages for v4 * remove files and generation for v0_10 and v5 as nodejs-5_x and nodejs-0_10 are no longer supported --- .../node-packages/composition-v5.nix | 16 - .../node-packages/default-v0_10.nix | 33 - pkgs/development/node-packages/default-v5.nix | 44 - pkgs/development/node-packages/generate.sh | 1 - pkgs/development/node-packages/node-env.nix | 93 +- .../node-packages/node-packages-v4.nix | 5413 ++-- .../node-packages/node-packages-v5.nix | 26989 ---------------- 7 files changed, 2934 insertions(+), 29655 deletions(-) delete mode 100644 pkgs/development/node-packages/composition-v5.nix delete mode 100644 pkgs/development/node-packages/default-v0_10.nix delete mode 100644 pkgs/development/node-packages/default-v5.nix delete mode 100644 pkgs/development/node-packages/node-packages-v5.nix diff --git a/pkgs/development/node-packages/composition-v5.nix b/pkgs/development/node-packages/composition-v5.nix deleted file mode 100644 index be9201677ce0..000000000000 --- a/pkgs/development/node-packages/composition-v5.nix +++ /dev/null @@ -1,16 +0,0 @@ -# This file has been generated by node2nix 1.1.0. Do not edit! - -{pkgs ? import { - inherit system; - }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-5_x"}: - -let - nodeEnv = import ./node-env.nix { - inherit (pkgs) stdenv python utillinux runCommand writeTextFile; - inherit nodejs; - }; -in -import ./node-packages-v5.nix { - inherit (pkgs) fetchurl fetchgit; - inherit nodeEnv; -} \ No newline at end of file diff --git a/pkgs/development/node-packages/default-v0_10.nix b/pkgs/development/node-packages/default-v0_10.nix deleted file mode 100644 index baaadb39160a..000000000000 --- a/pkgs/development/node-packages/default-v0_10.nix +++ /dev/null @@ -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 - ''; - }); -} diff --git a/pkgs/development/node-packages/default-v5.nix b/pkgs/development/node-packages/default-v5.nix deleted file mode 100644 index 00dce5966aae..000000000000 --- a/pkgs/development/node-packages/default-v5.nix +++ /dev/null @@ -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 - ''; - }); -} diff --git a/pkgs/development/node-packages/generate.sh b/pkgs/development/node-packages/generate.sh index 385463423ea2..8c701771d579 100755 --- a/pkgs/development/node-packages/generate.sh +++ b/pkgs/development/node-packages/generate.sh @@ -2,4 +2,3 @@ rm -f node-env.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 diff --git a/pkgs/development/node-packages/node-env.nix b/pkgs/development/node-packages/node-env.nix index 2a04b3dfba8f..c5c69c7d05d7 100644 --- a/pkgs/development/node-packages/node-env.nix +++ b/pkgs/development/node-packages/node-env.nix @@ -6,19 +6,19 @@ let # Create a tar wrapper that filters all the 'Ignoring unknown extended header keyword' noise tarWrapper = runCommand "tarWrapper" {} '' mkdir -p $out/bin - + cat > $out/bin/tar < package.json <