2018-10-02 20:10:58 +02:00
|
|
|
{ stdenv
|
|
|
|
, bash
|
|
|
|
, curl
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gawk
|
2018-10-02 20:30:31 +02:00
|
|
|
, host
|
|
|
|
, lib
|
2018-10-02 20:10:58 +02:00
|
|
|
, makeWrapper
|
|
|
|
, ncurses
|
|
|
|
, netcat
|
|
|
|
}:
|
2018-09-21 13:16:36 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "twa-${version}";
|
2019-03-03 06:47:07 +01:00
|
|
|
version = "1.8.0";
|
2018-09-21 13:16:36 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "trailofbits";
|
|
|
|
repo = "twa";
|
|
|
|
rev = version;
|
2019-03-03 06:47:07 +01:00
|
|
|
sha256 = "1xq35xyz5536nwrwmlp1wqa7q9jgh90ly7vdy3a5rvxnksx0b2l5";
|
2018-09-21 13:16:36 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
2018-10-02 20:10:58 +02:00
|
|
|
buildInputs = [ makeWrapper bash gawk curl netcat host.dnsutils ];
|
2018-09-21 13:16:36 +02: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" \
|
2018-10-02 20:10:58 +02:00
|
|
|
--prefix PATH : ${stdenv.lib.makeBinPath [ curl netcat ncurses host.dnsutils ]}
|
2018-09-21 13:16:36 +02:00
|
|
|
'';
|
|
|
|
|
2018-10-02 20:30:31 +02:00
|
|
|
meta = with lib; {
|
2018-09-21 13:16:36 +02:00
|
|
|
description = "A tiny web auditor with strong opinions";
|
|
|
|
homepage = https://github.com/trailofbits/twa;
|
2018-10-02 20:30:31 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ avaq ];
|
|
|
|
platforms = platforms.unix;
|
2018-09-21 13:16:36 +02:00
|
|
|
};
|
|
|
|
}
|