2022-01-27 00:19:43 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
2020-04-24 23:36:52 +00:00
|
|
|
, bash
|
|
|
|
, curl
|
2022-01-27 00:19:43 +00:00
|
|
|
, dnsutils
|
2020-04-24 23:36:52 +00:00
|
|
|
, gawk
|
|
|
|
, jq
|
|
|
|
, ncurses
|
|
|
|
, netcat
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "twa";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "1.11.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "trailofbits";
|
|
|
|
repo = "twa";
|
2022-01-27 00:19:43 +00:00
|
|
|
rev = "v${version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-B+UwH7oCtediLzurjYuLp56IxiKNAqyoW5QkwXX72MA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
buildInputs = [ bash
|
|
|
|
curl
|
2022-01-27 00:19:43 +00:00
|
|
|
dnsutils
|
2020-04-24 23:36:52 +00:00
|
|
|
gawk
|
|
|
|
jq
|
|
|
|
netcat ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-01-27 00:19:43 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
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 22:18:51 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ curl
|
2022-01-27 00:19:43 +00:00
|
|
|
dnsutils
|
|
|
|
gawk
|
|
|
|
jq
|
|
|
|
ncurses
|
|
|
|
netcat ]}
|
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tiny web auditor with strong opinions";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/trailofbits/twa";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ avaq ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|