Files
nixpkgs/pkgs/by-name/te/testssl/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

60 lines
1.4 KiB
Nix

{
stdenv,
fetchFromGitHub,
makeWrapper,
lib,
dnsutils,
coreutils,
openssl,
net-tools,
util-linux,
procps,
}:
stdenv.mkDerivation rec {
pname = "testssl.sh";
version = "3.2.2";
src = fetchFromGitHub {
owner = "drwetter";
repo = "testssl.sh";
rev = "v${version}";
sha256 = "sha256-zPqGCcWRwTYl7cGnrv9a5KOMe75xzU2xvf5z+Nqwfb0=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
coreutils # for printf
dnsutils # for dig
net-tools # for hostname
openssl # for openssl
procps # for ps
util-linux # for hexdump
];
postPatch = ''
substituteInPlace testssl.sh \
--replace TESTSSL_INSTALL_DIR:-\"\" TESTSSL_INSTALL_DIR:-\"$out\" \
--replace PROG_NAME=\"\$\(basename\ \"\$0\"\)\" PROG_NAME=\"testssl.sh\"
'';
installPhase = ''
install -D testssl.sh $out/bin/testssl.sh
cp -r etc $out
wrapProgram $out/bin/testssl.sh --prefix PATH ':' ${lib.makeBinPath buildInputs}
'';
meta = with lib; {
description = "CLI tool to check a server's TLS/SSL capabilities";
longDescription = ''
CLI tool which checks a server's service on any port for the support of
TLS/SSL ciphers, protocols as well as recent cryptographic flaws and more.
'';
homepage = "https://testssl.sh/";
license = licenses.gpl2Only;
maintainers = [ ];
mainProgram = "testssl.sh";
};
}