2017-04-13 14:25:17 +00:00
|
|
|
{ coreutils, dash, fetchgit, gnused, stdenv, ucspi-tcp }:
|
2017-03-16 19:56:08 +00:00
|
|
|
with import <stockholm/lib>;
|
|
|
|
let
|
2020-09-15 20:57:16 +00:00
|
|
|
version = "1.2.8";
|
2017-03-16 19:56:08 +00:00
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "htgen-${version}";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "http://cgit.krebsco.de/htgen";
|
2017-03-16 20:53:05 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2020-09-15 20:57:16 +00:00
|
|
|
sha256 = "046c05jswar2agagqixad3idqxca494aaf199h6bdn02cyzygnpq";
|
2017-03-16 19:56:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
{
|
2017-04-13 14:25:17 +00:00
|
|
|
echo '#! ${dash}/bin/dash'
|
2017-03-16 19:56:08 +00:00
|
|
|
echo 'export PATH=${makeBinPath [
|
|
|
|
coreutils
|
|
|
|
gnused
|
2017-04-13 14:25:17 +00:00
|
|
|
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
|
|
|
'';
|
|
|
|
}
|