mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
Add npm2nix as a nodePackage
This commit is contained in:
parent
9a8b0b644b
commit
a94e8d2756
@ -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;
|
||||
};
|
||||
}
|
@ -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 { };
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user