Add npm2nix

This commit is contained in:
Shea Levy 2012-07-25 18:11:57 -04:00
parent 42da3759a2
commit b0552eb9ca
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,26 @@
{ 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

@ -977,6 +977,10 @@ 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 { };