nixpkgs-suyu/pkgs/development/tools/sloc/default.nix

31 lines
925 B
Nix
Raw Normal View History

2014-08-27 00:11:08 +02:00
{ pkgs }:
let
nodePackages = import <nixpkgs/pkgs/top-level/node-packages.nix> {
inherit pkgs;
inherit (pkgs) stdenv nodejs fetchurl fetchgit;
neededNatives = [ pkgs.python ] ++ pkgs.lib.optional pkgs.stdenv.isLinux pkgs.utillinux;
self = nodePackages;
generated = ./package.nix;
};
in rec {
build = nodePackages.buildNodePackage {
2014-09-10 23:03:36 +02:00
name = "sloc-0.1.6";
2014-08-27 00:11:08 +02:00
src = [
(pkgs.fetchgit {
url = "https://github.com/flosse/sloc.git";
2014-09-10 23:03:36 +02:00
sha256 = "0064va0cd4604vqp8y8ggm33klp2xgqmgrwk9ilp7230x27wykyf";
rev = "refs/tags/v0.1.6";
2014-08-27 00:11:08 +02:00
})
];
buildInputs = [ pkgs.nodePackages.coffee-script ];
postInstall = ''
2014-09-10 23:03:36 +02:00
${nodePackages.coffee-script}/bin/coffee -o $out/lib/node_modules/sloc/lib/ -c $src/src/
2014-08-27 00:11:08 +02:00
'';
2014-09-10 23:03:36 +02:00
deps = [ nodePackages.commander nodePackages.async nodePackages.cli-table nodePackages.readdirp ];
2014-08-27 00:11:08 +02:00
passthru.names = [ "sloc" ];
};
}