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

44 lines
999 B
Nix
Raw Normal View History

2018-10-02 18:10:58 +00:00
{ stdenv
, bash
, host
, curl
, fetchFromGitHub
, gawk
, makeWrapper
, ncurses
, netcat
}:
2018-09-21 11:16:36 +00:00
stdenv.mkDerivation rec {
name = "twa-${version}";
2018-10-02 18:10:58 +00:00
version = "1.5.1";
2018-09-21 11:16:36 +00:00
src = fetchFromGitHub {
owner = "trailofbits";
repo = "twa";
rev = version;
2018-10-02 18:10:58 +00:00
sha256 = "14pwiq1kza92w2aq358zh5hrxpxpfhg31am03b56g6vlvqzsvib7";
2018-09-21 11:16:36 +00:00
};
dontBuild = true;
2018-10-02 18:10:58 +00:00
buildInputs = [ makeWrapper bash gawk curl netcat host.dnsutils ];
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" \
2018-10-02 18:10:58 +00:00
--prefix PATH : ${stdenv.lib.makeBinPath [ curl netcat ncurses host.dnsutils ]}
2018-09-21 11:16:36 +00:00
'';
meta = {
description = "A tiny web auditor with strong opinions";
homepage = https://github.com/trailofbits/twa;
license = stdenv.lib.licenses.mit;
maintainers = with stdenv.lib.maintainers; [ avaq ];
};
}