lol
1{ lib
2, stdenv
3, fetchFromGitHub
4, makeWrapper
5, bash
6, curl
7, dnsutils
8, gawk
9, jq
10, ncurses
11, netcat
12}:
13
14stdenv.mkDerivation rec {
15 pname = "twa";
16 version = "1.10.0";
17
18 src = fetchFromGitHub {
19 owner = "trailofbits";
20 repo = "twa";
21 rev = "v${version}";
22 hash = "sha256-8c1o03iwStmhjKHmEXIZGyaSOAJRlOuhu0ERjCO5SHg=";
23 };
24
25 dontBuild = true;
26
27 nativeBuildInputs = [ makeWrapper ];
28
29 buildInputs = [ bash
30 curl
31 dnsutils
32 gawk
33 jq
34 netcat ];
35
36 installPhase = ''
37 runHook preInstall
38
39 install -Dm 0755 twa "$out/bin/twa"
40 install -Dm 0755 tscore "$out/bin/tscore"
41 install -Dm 0644 twa.1 "$out/share/man/man1/twa.1"
42 install -Dm 0644 README.md "$out/share/doc/twa/README.md"
43
44 wrapProgram "$out/bin/twa" \
45 --prefix PATH : ${lib.makeBinPath [ curl
46 dnsutils
47 gawk
48 jq
49 ncurses
50 netcat ]}
51
52 runHook postInstall
53 '';
54
55 meta = with lib; {
56 description = "A tiny web auditor with strong opinions";
57 homepage = "https://github.com/trailofbits/twa";
58 license = licenses.mit;
59 maintainers = with maintainers; [ avaq ];
60 platforms = platforms.unix;
61 };
62}