2020-12-30 10:58:05 +00:00
|
|
|
{ fetchgit, lib, pkgs, stdenv }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "htgen";
|
2022-12-06 18:31:22 +00:00
|
|
|
version = "1.4.0";
|
2017-03-16 19:56:08 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
2022-12-06 18:31:22 +00:00
|
|
|
url = "https://cgit.krebsco.de/htgen";
|
2021-07-27 21:33:02 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2022-12-06 18:31:22 +00:00
|
|
|
sha256 = "1k6xdr4g1p2wjiyizwh33ihw3azbar7kmhyxywcq0whpip9inpmj";
|
2017-03-16 19:56:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
{
|
2020-12-30 10:58:05 +00:00
|
|
|
echo '#! ${pkgs.dash}/bin/dash'
|
|
|
|
echo 'export PATH=${lib.makeBinPath [
|
|
|
|
pkgs.coreutils
|
|
|
|
pkgs.jq
|
|
|
|
pkgs.ucspi-tcp
|
2017-03-16 20:53:05 +00:00
|
|
|
]}''${PATH+":$PATH"}'
|
2017-04-13 14:25:17 +00:00
|
|
|
sed 's:^Server=htgen$:&/${version}:' htgen
|
2017-03-16 19:56:08 +00:00
|
|
|
} > $out/bin/htgen
|
|
|
|
chmod +x $out/bin/htgen
|
2017-03-16 20:53:05 +00:00
|
|
|
cp -r examples $out
|
2017-03-16 19:56:08 +00:00
|
|
|
'';
|
|
|
|
}
|