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

37 lines
644 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 {
2016-11-11 10:37:45 +00:00
url = http://cgit.ni.krebsco.de/dic;
2017-08-10 08:07:49 +00:00
rev = "refs/tags/v1.0.2";
sha256 = "133x2z3dr5synckdvgnyc9fa7jdca43vj0973v148i13x4dqgr36";
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,' \
2016-11-11 10:37:45 +00:00
< ./dic \
2015-07-19 09:13:13 +00:00
> $out/bin/dic
chmod +x $out/bin/dic
'';
}