From 6539722622f883aef7650136b5ff7d54b5535a14 Mon Sep 17 00:00:00 2001 From: Aldwin Vlasblom Date: Fri, 21 Sep 2018 13:16:36 +0200 Subject: [PATCH] twa: init at 1.3.1 --- maintainers/maintainer-list.nix | 5 ++++ pkgs/tools/networking/twa/default.nix | 34 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 41 insertions(+) create mode 100644 pkgs/tools/networking/twa/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 726cbd74313a..4748597ca5f0 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -376,6 +376,11 @@ github = "auntie"; name = "Jonathan Glines"; }; + avaq = { + email = "avaq+nixos@xs4all.nl"; + github = "avaq"; + name = "Aldwin Vlasblom"; + }; avery = { email = "averyl+nixos@protonmail.com"; github = "AveryLychee"; diff --git a/pkgs/tools/networking/twa/default.nix b/pkgs/tools/networking/twa/default.nix new file mode 100644 index 000000000000..f8004ad0068d --- /dev/null +++ b/pkgs/tools/networking/twa/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchFromGitHub, makeWrapper, bash, gawk, curl, netcat, ncurses }: + +stdenv.mkDerivation rec { + name = "twa-${version}"; + version = "1.3.1"; + + src = fetchFromGitHub { + owner = "trailofbits"; + repo = "twa"; + rev = version; + sha256 = "16x9nzsrf10waqmjm423vx44820c6mls7gxc8azrdqnz18vdy1h4"; + }; + + dontBuild = true; + + buildInputs = [ makeWrapper bash gawk curl netcat ]; + + 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" \ + --prefix PATH : ${stdenv.lib.makeBinPath [ curl netcat ncurses ]} + ''; + + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index da1a81bdb085..5da0a970e525 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14733,6 +14733,8 @@ with pkgs; tunctl = callPackage ../os-specific/linux/tunctl { }; + twa = callPackage ../tools/networking/twa { }; + # Upstream U-Boots: inherit (callPackage ../misc/uboot {}) buildUBoot