summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/htgen/default.nix
blob: c6dc6e9ae55913df518a3c072d6b89cf21a2fdec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ bash, coreutils, gnused, stdenv, fetchgit, ucspi-tcp }:
with import <stockholm/lib>;
let
  version = "1.2";
in stdenv.mkDerivation {
  name = "htgen-${version}";

  src = fetchgit {
    url = "http://cgit.krebsco.de/htgen";
    rev = "refs/tags/v${version}";
    sha256 = "0y7gi4r32dvc18a4nnkr74sbq4glqcmf1q6lfj8fpgj82lg16zc6";
  };

  installPhase = ''
    mkdir -p $out/bin
    {
      echo '#! ${bash}/bin/bash'
      echo 'export PATH=${makeBinPath [
        ucspi-tcp
        coreutils
        gnused
      ]}''${PATH+":$PATH"}'
      cat htgen
    } > $out/bin/htgen
    chmod +x $out/bin/htgen
    cp -r examples $out
  '';
}