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

31 lines
886 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 = [ nodePackages.coffee-script ];
2014-08-27 00:11:08 +02:00
postInstall = ''
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" ];
};
}