2018-10-02 18:10:58 +00:00
|
|
|
{ stdenv
|
|
|
|
, bash
|
|
|
|
, curl
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gawk
|
2018-10-02 18:30:31 +00:00
|
|
|
, host
|
2019-11-03 20:07:46 +00:00
|
|
|
, jq
|
2018-10-02 18:30:31 +00:00
|
|
|
, lib
|
2018-10-02 18:10:58 +00:00
|
|
|
, makeWrapper
|
|
|
|
, ncurses
|
|
|
|
, netcat
|
|
|
|
}:
|
2018-09-21 11:16:36 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "twa";
|
2019-11-03 20:07:46 +00:00
|
|
|
version = "1.9.1";
|
2018-09-21 11:16:36 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "trailofbits";
|
|
|
|
repo = "twa";
|
|
|
|
rev = version;
|
2019-11-03 20:07:46 +00:00
|
|
|
sha256 = "1ab3bcyhfach9y15w8ffvqqan2qk8h62n6z8nqbgygi7n1mf6jzx";
|
2018-09-21 11:16:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
2019-11-03 20:07:46 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
buildInputs = [ bash
|
|
|
|
curl
|
|
|
|
gawk
|
|
|
|
host.dnsutils
|
|
|
|
jq
|
|
|
|
netcat ];
|
2018-09-21 11:16:36 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm 0755 twa "$out/bin/twa"
|
|
|
|
install -Dm 0755 tscore "$out/bin/tscore"
|
|
|
|
install -Dm 0644 twa.1 "$out/share/man/man1/twa.1"
|
|
|
|
install -Dm 0644 README.md "$out/share/doc/twa/README.md"
|
|
|
|
|
|
|
|
wrapProgram "$out/bin/twa" \
|
2021-01-15 09:19:50 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ curl
|
2019-11-03 20:07:46 +00:00
|
|
|
host.dnsutils
|
|
|
|
jq
|
|
|
|
ncurses
|
|
|
|
netcat ]}
|
2018-09-21 11:16:36 +00:00
|
|
|
'';
|
|
|
|
|
2018-10-02 18:30:31 +00:00
|
|
|
meta = with lib; {
|
2018-09-21 11:16:36 +00:00
|
|
|
description = "A tiny web auditor with strong opinions";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/trailofbits/twa";
|
2018-10-02 18:30:31 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ avaq ];
|
|
|
|
platforms = platforms.unix;
|
2018-09-21 11:16:36 +00:00
|
|
|
};
|
|
|
|
}
|