3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/testssl/default.nix

49 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, makeWrapper, lib
2020-11-24 15:29:28 +00:00
, dnsutils, coreutils, openssl, nettools, util-linux, procps }:
stdenv.mkDerivation rec {
pname = "testssl.sh";
2021-10-03 13:46:52 +01:00
version = "3.0.6";
src = fetchFromGitHub {
owner = "drwetter";
repo = pname;
2021-10-03 13:46:52 +01:00
rev = "v${version}";
sha256 = "016qpsb4dv9qb3ab3hmvk4vzf4ipr3xgmzv2cx46pxxsj0gnigd8";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
2021-10-03 13:46:52 +01:00
coreutils # for printf
dnsutils # for dig
nettools # for hostname
openssl # for openssl
procps # for ps
2020-11-24 15:29:28 +00:00
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/";
2021-06-18 11:30:03 +01:00
license = licenses.gpl2Only;
maintainers = with maintainers; [ etu ];
};
}