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

29 lines
637 B
Nix
Raw Normal View History

2017-03-16 20:53:05 +00:00
{ bash, coreutils, gnused, stdenv, fetchgit, ucspi-tcp }:
2017-03-16 19:56:08 +00:00
with import <stockholm/lib>;
let
2017-04-13 13:33:49 +00:00
version = "1.2.1";
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}";
2017-04-13 13:33:49 +00:00
sha256 = "0mh8n9hf4jmkcxwdw3rimwdlhslrnpsdg1cp2vq3h9j2jkrsq6ba";
2017-03-16 19:56:08 +00:00
};
installPhase = ''
mkdir -p $out/bin
{
echo '#! ${bash}/bin/bash'
echo 'export PATH=${makeBinPath [
ucspi-tcp
coreutils
gnused
2017-03-16 20:53:05 +00:00
]}''${PATH+":$PATH"}'
cat 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
'';
}