2013-08-26 21:55:48 +02:00
|
|
|
{ pkgs, stdenv, nodejs, fetchurl, neededNatives, self, generated ? ./node-packages-generated.nix }:
|
2012-07-25 23:46:21 +02:00
|
|
|
|
2013-08-20 19:12:56 +02:00
|
|
|
{
|
2013-05-31 18:50:28 +02:00
|
|
|
nativeDeps = {
|
2013-11-06 00:02:16 +01:00
|
|
|
"node-expat" = [ pkgs.expat ];
|
|
|
|
"rbytes" = [ pkgs.openssl ];
|
|
|
|
"phantomjs" = [ pkgs.phantomjs ];
|
2013-05-31 18:50:28 +02:00
|
|
|
};
|
2013-05-29 17:22:18 +02:00
|
|
|
|
2013-05-31 18:50:28 +02:00
|
|
|
buildNodePackage = import ../development/web/nodejs/build-node-package.nix {
|
|
|
|
inherit stdenv nodejs neededNatives;
|
|
|
|
inherit (pkgs) runCommand;
|
|
|
|
};
|
2013-05-29 17:22:18 +02:00
|
|
|
|
2013-05-31 18:50:28 +02: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 04:29:00 +02:00
|
|
|
|
2013-05-31 18:50:28 +02:00
|
|
|
/* Put manual packages below here (ideally eventually managed by npm2nix */
|
2013-08-26 21:55:48 +02:00
|
|
|
} // import generated { inherit self fetchurl; inherit (pkgs) lib; }
|