Add npm2nix as a nodePackage

This commit is contained in:
Shea Levy 2012-08-26 16:02:04 -04:00
parent 9a8b0b644b
commit a94e8d2756
3 changed files with 14 additions and 30 deletions

View File

@ -1,26 +0,0 @@
{ stdenv, fetchurl, coffeescript }:
let version = "0.1"; in
stdenv.mkDerivation rec {
name = "npm2nix-${version}";
src = fetchurl {
url = "https://bitbucket.org/shlevy/npm2nix/get/${version}.tar.bz2";
sha256 = "14rfs114k02yc9gx0bcjqy67f9cqgkrr1dccwlzl09q9b6qs1k3k";
};
phases = [ "unpackPhase" "installPhase" ];
installPhase = ''
mkdir -p $out/bin
sed 's|#!/usr/bin/env coffee|#!${coffeescript}/bin/coffee|' npm2nix.coffee \
> $out/bin/npm2nix
chmod +x $out/bin/npm2nix
'';
meta = {
description = "A tool to generate nix expressions from npm packages";
maintainer = stdenv.lib.maintainers.shlevy;
};
}

View File

@ -986,10 +986,6 @@ let
inherit pkgs stdenv nodejs fetchurl;
});
npm2nix = callPackage ../development/tools/node/npm2nix {
coffeescript = nodePackages."coffee-script";
};
ldns = callPackage ../development/libraries/ldns { };
lftp = callPackage ../tools/networking/lftp { };

View File

@ -30,6 +30,20 @@ let self = {
];
};
"npm2nix" = self."npm2nix-0.1.1";
"npm2nix-0.1.1" = self.buildNodePackage rec {
name = "npm2nix-0.1.1";
src = fetchurl {
url = https://bitbucket.org/shlevy/npm2nix/get/0.1.1.tar.gz;
sha256 = "0rrvlavx6myl8792y2xfz79a3khww3yak81by1f5axm0g1mcwiw7";
name = "${name}.tgz";
};
deps = [
self."semver-1.0.14"
];
};
};
in self