571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
63 lines
1.4 KiB
Nix
63 lines
1.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, makeWrapper
|
|
, bash
|
|
, curl
|
|
, dnsutils
|
|
, gawk
|
|
, jq
|
|
, ncurses
|
|
, netcat
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "twa";
|
|
version = "1.11.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "trailofbits";
|
|
repo = "twa";
|
|
rev = "v${version}";
|
|
hash = "sha256-B+UwH7oCtediLzurjYuLp56IxiKNAqyoW5QkwXX72MA=";
|
|
};
|
|
|
|
dontBuild = true;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ bash
|
|
curl
|
|
dnsutils
|
|
gawk
|
|
jq
|
|
netcat ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
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 : ${lib.makeBinPath [ curl
|
|
dnsutils
|
|
gawk
|
|
jq
|
|
ncurses
|
|
netcat ]}
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Tiny web auditor with strong opinions";
|
|
homepage = "https://github.com/trailofbits/twa";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ avaq ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|