stockholm/krebs/5pkgs/dic/default.nix

37 lines
685 B
Nix
Raw Normal View History

2015-07-19 09:13:13 +00:00
{ stdenv, fetchgit, coreutils, curl, gnused, gnugrep, ... }:
stdenv.mkDerivation {
name = "dic";
src = fetchgit {
url = https://github.com/krebscode/painload;
rev = "35ccac73d563ad30d2851b9aeed4cfef69ff74e3";
2016-10-06 17:16:42 +00:00
sha256 = "0arsfcd8qdrqafw7cxiag7f0kn95nwxxwrs0kdzxxdryfr6l1h07";
2015-07-19 09:13:13 +00:00
};
phases = [
"unpackPhase"
"installPhase"
];
installPhase =
let
2016-03-03 18:45:46 +00:00
path = stdenv.lib.makeBinPath [
2015-07-19 09:13:13 +00:00
coreutils
curl
gnused
gnugrep
];
in
''
mkdir -p $out/bin
sed \
's,^main() {$,&\n PATH=${path}; export PATH,' \
< ./util/bin/dic \
> $out/bin/dic
chmod +x $out/bin/dic
'';
}