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

29 lines
635 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-03-16 20:53:05 +00:00
version = "1.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}";
sha256 = "1zxj0fv9vdrqyl3x2hgq7a6xdlzpclf93akygysrzsqk9wjapp4z";
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
'';
}