nodePackages: add a few packages, remove deprecated, regenerate, fix them

This commit is contained in:
Jaka Hudoklin 2015-02-23 13:29:06 +01:00
parent b2fdcf801c
commit d84a4f5699
3 changed files with 11746 additions and 1341 deletions

File diff suppressed because it is too large Load Diff

View File

@ -26,17 +26,15 @@
, "temp"
, "faye-websocket"
, "node-uuid"
, "rbytes"
, "sockjs"
, "backbone"
, "browserchannel"
, "node-gyp"
, "semver"
, { "npm2nix": "git://github.com/NixOS/npm2nix.git#5.10.3" }
, { "npm2nix": "git://github.com/NixOS/npm2nix.git#5.11.0" }
, "ansi-remover"
, "mkdirp"
, "jshint"
, "stream-splitter-transform"
, "bcrypt"
, "nconf"
, "winston"
@ -59,7 +57,6 @@
, "should"
, "nodemon"
, "timezone"
, "libyaml"
, "i18next"
, "stylus"
, "nib"
@ -85,6 +82,7 @@
, "grunt-karma"
, "grunt-sed"
, "gulp"
, "webpack"
, "karma"
, "karma-mocha"
, "karma-coverage"
@ -139,10 +137,8 @@
, "node-xmpp-server"
, "node-xmpp-serviceadmin"
, "node-xmpp-joap"
, "plc"
, "7f"
, "jfs"
, "toobusy"
, "cordova"
, "sloc"
, "peerflix"
@ -194,4 +190,6 @@
, "bip-pod-github"
, "bip-pod-google-drive"
, "bip-pod-github"
, "sleep"
, "node-red"
]

View File

@ -17,22 +17,53 @@
with stdenv.lib;
rec {
let
removeDeps = remove: deps: filterAttrs (n: d: all (r: r != d.pkgName) remove) deps;
replaceDep = replace: deps: mapAttrs (n: d: if d.pkgName == replace.pkgName then replace else d) deps;
in rec {
overrides = {
phantomjs.buildInputs = [ pkgs.phantomjs ];
"node-expat".buildInputs = [ pkgs.expat ];
"node-stringprep".buildInputs = [ pkgs.icu pkgs.which ];
"node-protobuf".buildInputs = [ pkgs.protobuf ];
"rbytes".buildInputs = [ pkgs.openssl ];
bipio.patchPhase = ''
${self.json}/bin/json -I -f package.json -e 'this.scripts.install=""'
"tap-0.3.3".patchPhase = ''
substituteInPlace package.json --replace '"tap-consumer",' ""
'';
"node-uptime" = (p: {
# Net-ping is not really used
patchPhase = ''
${self.json}/bin/json -I -f package.json -e 'delete this.dependencies["net-ping"]'
'';
deps = removeDeps ["net-ping"] p.deps;
});
bipio = (p: {
patchPhase = ''
substituteInPlace src/bootstrap.js --replace "memwatch = require('memwatch')," ""
${self.json}/bin/json -I -f package.json -e 'this.scripts.install=""'
${self.json}/bin/json -I -f package.json -e 'delete this.dependencies.sleep'
${self.json}/bin/json -I -f package.json -e 'delete this.dependencies.memwatch'
${self.json}/bin/json -I -f package.json -e 'delete this.dependencies["webkit-devtools-agent"]'
'';
deps = replaceDep self.sleep (removeDeps ["memwatch" "webkit-devtools-agent"] p.deps);
});
bip-pod.patchPhase = ''
substituteInPlace index.js --replace \
"__dirname + (literal ? '/' : '/../bip-pod-') + podName" \
"(literal ? __dirname + '/' : \"bip-pod-\") + podName"
'';
webdrvr.preBuild = ''
mkdir ../webdrvr
ln -s ${pkgs.fetchurl {
url = "https://selenium-release.storage.googleapis.com/2.43/selenium-server-standalone-2.43.1.jar";
sha1 = "ef1b5f8ae9c99332f99ba8794988a1d5b974d27b";
}} ../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";
}} ../webdrvr/chromedriver_linux64.zip
'';
statsd.skipOptionalDependencies = ["hashring" "node-syslog"];
} // args.overrides or {};
# Apply overrides and back compatiblity transformations