2018-04-14 20:17:44 +01:00
|
|
|
{ stdenv, fetchFromGitHub, makeWrapper, lib
|
2020-11-24 15:29:28 +00:00
|
|
|
, dnsutils, coreutils, openssl, nettools, util-linux, procps }:
|
2017-09-23 10:48:51 +01:00
|
|
|
|
2019-04-24 21:39:26 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "testssl.sh";
|
2021-10-03 13:46:52 +01:00
|
|
|
version = "3.0.6";
|
2017-09-23 10:48:51 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "drwetter";
|
2019-04-25 12:54:49 +01:00
|
|
|
repo = pname;
|
2021-10-03 13:46:52 +01:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "016qpsb4dv9qb3ab3hmvk4vzf4ipr3xgmzv2cx46pxxsj0gnigd8";
|
2017-09-23 10:48:51 +01:00
|
|
|
};
|
|
|
|
|
2018-04-14 20:17:44 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [
|
2021-10-03 13:46:52 +01:00
|
|
|
coreutils # for printf
|
2018-04-14 20:17:44 +01:00
|
|
|
dnsutils # for dig
|
|
|
|
nettools # for hostname
|
|
|
|
openssl # for openssl
|
|
|
|
procps # for ps
|
2020-11-24 15:29:28 +00:00
|
|
|
util-linux # for hexdump
|
2018-04-14 20:17:44 +01:00
|
|
|
];
|
2017-09-23 10:48:51 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
2018-04-09 17:49:50 +01:00
|
|
|
substituteInPlace testssl.sh \
|
2019-04-25 12:54:49 +01:00
|
|
|
--replace TESTSSL_INSTALL_DIR:-\"\" TESTSSL_INSTALL_DIR:-\"$out\" \
|
|
|
|
--replace PROG_NAME=\"\$\(basename\ \"\$0\"\)\" PROG_NAME=\"testssl.sh\"
|
2017-09-23 10:48:51 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2019-04-24 21:39:26 +01:00
|
|
|
install -D testssl.sh $out/bin/testssl.sh
|
2018-04-14 20:17:44 +01:00
|
|
|
cp -r etc $out
|
2019-04-24 21:39:26 +01:00
|
|
|
|
|
|
|
wrapProgram $out/bin/testssl.sh --prefix PATH ':' ${lib.makeBinPath buildInputs}
|
2017-09-23 10:48:51 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-09-23 10:48:51 +01:00
|
|
|
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.
|
|
|
|
'';
|
2019-12-14 15:23:06 +00:00
|
|
|
homepage = "https://testssl.sh/";
|
2021-06-18 11:30:03 +01:00
|
|
|
license = licenses.gpl2Only;
|
2018-04-14 20:17:44 +01:00
|
|
|
maintainers = with maintainers; [ etu ];
|
2017-09-23 10:48:51 +01:00
|
|
|
};
|
|
|
|
}
|