2017-08-30 15:54:11 +00:00
|
|
|
{ coreutils, curl, fetchgit, gnugrep, gnused, stdenv, utillinux }:
|
2015-07-19 09:13:13 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "dic";
|
|
|
|
|
|
|
|
src = fetchgit {
|
2016-11-11 10:37:45 +00:00
|
|
|
url = http://cgit.ni.krebsco.de/dic;
|
2017-08-30 15:54:11 +00:00
|
|
|
rev = "refs/tags/v1.1.0";
|
|
|
|
sha256 = "1xzn20b9kfz96nvjli8grpi11v80jbl0dmifksmirwcj5v81ndav";
|
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
|
2017-08-30 15:54:11 +00:00
|
|
|
utillinux
|
2015-07-19 09:13:13 +00:00
|
|
|
];
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
}
|