2013-08-26 23:55:48 +04:00
|
|
|
{ pkgs, stdenv, nodejs, fetchurl, neededNatives, self, generated ? ./node-packages-generated.nix }:
|
2012-07-26 01:46:21 +04:00
|
|
|
|
2013-08-20 21:12:56 +04:00
|
|
|
{
|
2013-05-31 20:50:28 +04:00
|
|
|
nativeDeps = {
|
2013-07-27 21:33:18 +04:00
|
|
|
"node-expat"."*" = [ pkgs.expat ];
|
2013-09-04 21:29:15 +04:00
|
|
|
"rbytes"."*" = [ pkgs.openssl ];
|
2013-08-21 02:56:13 +04:00
|
|
|
"phantomjs"."~1.9" = [ pkgs.phantomjs ];
|
2013-05-31 20:50:28 +04:00
|
|
|
};
|
2013-05-29 19:22:18 +04:00
|
|
|
|
2013-05-31 20:50:28 +04:00
|
|
|
buildNodePackage = import ../development/web/nodejs/build-node-package.nix {
|
|
|
|
inherit stdenv nodejs neededNatives;
|
|
|
|
inherit (pkgs) runCommand;
|
|
|
|
};
|
2013-05-29 19:22:18 +04:00
|
|
|
|
2013-05-31 20:50:28 +04:00
|
|
|
patchLatest = srcAttrs:
|
|
|
|
let src = fetchurl srcAttrs; in pkgs.runCommand src.name {} ''
|
|
|
|
mkdir unpack
|
|
|
|
cd unpack
|
|
|
|
tar xf ${src}
|
|
|
|
mv */ package 2>/dev/null || true
|
|
|
|
sed -i -e "s/: \"latest\"/: \"*\"/" package/package.json
|
|
|
|
tar cf $out *
|
|
|
|
'';
|
2013-05-28 06:29:00 +04:00
|
|
|
|
2013-05-31 20:50:28 +04:00
|
|
|
/* Put manual packages below here (ideally eventually managed by npm2nix */
|
2013-08-26 23:55:48 +04:00
|
|
|
} // import generated { inherit self fetchurl; inherit (pkgs) lib; }
|