2021-06-01 22:34:31 +00:00
|
|
|
{ fetchgit, lib, stdenv
|
2022-09-27 10:26:37 +00:00
|
|
|
, coreutils, curl, gnugrep, gnused, util-linux
|
2021-06-01 22:34:31 +00:00
|
|
|
}:
|
2015-07-19 09:13:13 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "dic";
|
|
|
|
|
|
|
|
src = fetchgit {
|
2020-06-08 21:10:56 +00:00
|
|
|
url = https://cgit.ni.krebsco.de/dic;
|
|
|
|
rev = "refs/tags/v1.1.1";
|
|
|
|
sha256 = "1gbj967a5hj53fdkkxijqgwnl9hb8kskz0cmpjq7v65ffz3v6vag";
|
2015-07-19 09:13:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
phases = [
|
|
|
|
"unpackPhase"
|
|
|
|
"installPhase"
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase =
|
|
|
|
let
|
2021-06-01 22:34:31 +00:00
|
|
|
path = lib.makeBinPath [
|
2015-07-19 09:13:13 +00:00
|
|
|
coreutils
|
|
|
|
curl
|
|
|
|
gnused
|
|
|
|
gnugrep
|
2022-09-27 10:26:37 +00:00
|
|
|
util-linux
|
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
|
|
|
|
'';
|
|
|
|
}
|