summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/htgen/default.nix
diff options
context:
space:
mode:
authorlassulus <lass@lassul.us>2017-03-16 20:56:08 +0100
committerlassulus <lass@lassul.us>2017-03-16 20:56:08 +0100
commit90a3a1910433cc678d6b55943dd2936b637a3b59 (patch)
treeaa1ea90c3fe0cd53343656f0c7c483804c350372 /krebs/5pkgs/htgen/default.nix
parent5ae78442de2614027aab002426d258ac620fba78 (diff)
htgen: init
Diffstat (limited to 'krebs/5pkgs/htgen/default.nix')
-rw-r--r--krebs/5pkgs/htgen/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/krebs/5pkgs/htgen/default.nix b/krebs/5pkgs/htgen/default.nix
new file mode 100644
index 000000000..86e9f2b65
--- /dev/null
+++ b/krebs/5pkgs/htgen/default.nix
@@ -0,0 +1,30 @@
+{ bash, coreutils, gnused, stdenv, fetchgit, script ? "", ucspi-tcp }:
+with import <stockholm/lib>;
+let
+ version = "1.0";
+in stdenv.mkDerivation {
+ name = "htgen-${version}";
+
+ src = fetchgit {
+ url = "http://cgit.krebsco.de/htgen";
+ rev = "refs/v1.0";
+ sha256 = "15z451f57ddaxm21dlqqx2kavzyqx4sgnnzz4ql6vl237979g09s";
+ };
+
+ installPhase = ''
+ find
+ mkdir -p $out/bin
+ {
+ echo '#! ${bash}/bin/bash'
+ echo 'export PATH=${makeBinPath [
+ ucspi-tcp
+ coreutils
+ gnused
+ ]}'
+ sed -n '/^reply_404$/q;p' < htgen
+ printf '%s' ${shell.escape script}
+ echo 'reply_404'
+ } > $out/bin/htgen
+ chmod +x $out/bin/htgen
+ '';
+}