node-packages: ability to fix sources that use the impure "latest" dependency

This commit is contained in:
Mathijs Kwik 2012-09-04 17:46:32 +02:00
parent df82c94263
commit 278312a38c

View File

@ -5,6 +5,14 @@ let self = {
inherit stdenv nodejs;
};
patchLatest = srcAttrs:
let src = fetchurl srcAttrs; in
pkgs.runCommand src.name {} ''
tar xf ${src}
sed -i -e "s/: \"latest\"/: \"*\"/" package/package.json
tar cf $out package
'';
"abbrev" = self."abbrev-1";
"abbrev-1" = self.buildNodePackage rec {