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

28 lines
640 B
Nix
Raw Normal View History

2020-12-30 10:58:05 +00:00
{ fetchgit, lib, pkgs, stdenv }:
stdenv.mkDerivation rec {
pname = "htgen";
2021-07-27 21:33:02 +00:00
version = "1.3.1";
2017-03-16 19:56:08 +00:00
2021-07-27 21:33:02 +00:00
#src = <htgen>;
2017-03-16 19:56:08 +00:00
src = fetchgit {
url = "http://cgit.krebsco.de/htgen";
2021-07-27 21:33:02 +00:00
rev = "refs/tags/${version}";
sha256 = "0ml8kp89bwkrwy6iqclzyhxgv2qn9dcpwaafbmsr4mgcl70zx22r";
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
'';
}