From 278312a38cdf0735957eefb8354627fd5191f9b4 Mon Sep 17 00:00:00 2001 From: Mathijs Kwik Date: Tue, 4 Sep 2012 17:46:32 +0200 Subject: [PATCH] node-packages: ability to fix sources that use the impure "latest" dependency --- pkgs/top-level/node-packages.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/top-level/node-packages.nix b/pkgs/top-level/node-packages.nix index ae468d95eac..ee05b92a255 100644 --- a/pkgs/top-level/node-packages.nix +++ b/pkgs/top-level/node-packages.nix @@ -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 {