2018-04-14 19:17:44 +00:00
|
|
|
{ stdenv, fetchFromGitHub, makeWrapper, lib
|
|
|
|
, dnsutils, coreutils, openssl, nettools, utillinux, procps }:
|
2017-09-23 09:48:51 +00:00
|
|
|
|
2019-04-24 20:39:26 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "testssl.sh";
|
2020-05-16 20:23:11 +00:00
|
|
|
version = "3.0.2";
|
2017-09-23 09:48:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "drwetter";
|
2019-04-25 11:54:49 +00:00
|
|
|
repo = pname;
|
2019-04-24 20:42:40 +00:00
|
|
|
rev = version;
|
2020-05-16 20:23:11 +00:00
|
|
|
sha256 = "0vfpj3g3il3imbydx3j8gx1pgzrxi0czcl9jmi749vnkf5mkmh8w";
|
2017-09-23 09:48:51 +00:00
|
|
|
};
|
|
|
|
|
2018-04-14 19:17:44 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [
|
|
|
|
coreutils # for pwd and printf
|
|
|
|
dnsutils # for dig
|
|
|
|
nettools # for hostname
|
|
|
|
openssl # for openssl
|
|
|
|
procps # for ps
|
|
|
|
utillinux # for hexdump
|
|
|
|
];
|
2017-09-23 09:48:51 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2018-04-09 16:49:50 +00:00
|
|
|
substituteInPlace testssl.sh \
|
2018-04-14 19:17:44 +00:00
|
|
|
--replace /bin/pwd pwd \
|
2019-04-25 11:54:49 +00:00
|
|
|
--replace TESTSSL_INSTALL_DIR:-\"\" TESTSSL_INSTALL_DIR:-\"$out\" \
|
|
|
|
--replace PROG_NAME=\"\$\(basename\ \"\$0\"\)\" PROG_NAME=\"testssl.sh\"
|
2017-09-23 09:48:51 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2019-04-24 20:39:26 +00:00
|
|
|
install -D testssl.sh $out/bin/testssl.sh
|
2018-04-14 19:17:44 +00:00
|
|
|
cp -r etc $out
|
2019-04-24 20:39:26 +00:00
|
|
|
|
|
|
|
wrapProgram $out/bin/testssl.sh --prefix PATH ':' ${lib.makeBinPath buildInputs}
|
2017-09-23 09:48:51 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.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.
|
|
|
|
'';
|
2019-12-14 15:23:06 +00:00
|
|
|
homepage = "https://testssl.sh/";
|
2017-09-23 09:48:51 +00:00
|
|
|
license = licenses.gpl2;
|
2018-04-14 19:17:44 +00:00
|
|
|
maintainers = with maintainers; [ etu ];
|
2017-09-23 09:48:51 +00:00
|
|
|
};
|
|
|
|
}
|