nixpkgs/pkgs/tools/networking/twa/default.nix

63 lines
1.4 KiB
Nix
Raw Normal View History

2022-01-27 18:46:26 +00:00
{ lib
, stdenv
, fetchFromGitHub
, makeWrapper
2018-10-02 18:10:58 +00:00
, bash
, curl
2022-01-27 18:46:26 +00:00
, dnsutils
2018-10-02 18:10:58 +00:00
, gawk
, jq
2018-10-02 18:10:58 +00:00
, ncurses
, netcat
}:
2018-09-21 11:16:36 +00:00
stdenv.mkDerivation rec {
pname = "twa";
2022-01-27 18:46:26 +00:00
version = "1.10.0";
2018-09-21 11:16:36 +00:00
src = fetchFromGitHub {
owner = "trailofbits";
repo = "twa";
2022-01-27 18:46:26 +00:00
rev = "v${version}";
hash = "sha256-8c1o03iwStmhjKHmEXIZGyaSOAJRlOuhu0ERjCO5SHg=";
2018-09-21 11:16:36 +00:00
};
dontBuild = true;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ bash
curl
2022-01-27 18:46:26 +00:00
dnsutils
gawk
jq
netcat ];
2018-09-21 11:16:36 +00:00
installPhase = ''
2022-01-27 18:46:26 +00:00
runHook preInstall
2018-09-21 11:16:36 +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 09:19:50 +00:00
--prefix PATH : ${lib.makeBinPath [ curl
2022-01-27 18:46:26 +00:00
dnsutils
gawk
jq
ncurses
netcat ]}
runHook postInstall
2018-09-21 11:16:36 +00:00
'';
meta = with lib; {
2018-09-21 11:16:36 +00:00
description = "A tiny web auditor with strong opinions";
homepage = "https://github.com/trailofbits/twa";
license = licenses.mit;
maintainers = with maintainers; [ avaq ];
platforms = platforms.unix;
2018-09-21 11:16:36 +00:00
};
}