2018-04-14 20:17:44 +01:00
|
|
|
{ stdenv, fetchFromGitHub, makeWrapper, lib
|
|
|
|
, dnsutils, coreutils, openssl, nettools, utillinux, procps }:
|
2017-09-23 10:48:51 +01:00
|
|
|
|
2017-12-27 12:23:59 +00:00
|
|
|
let
|
2018-09-24 16:40:24 +01:00
|
|
|
version = "2.9.5-7";
|
2017-12-27 12:23:59 +00:00
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2017-09-23 10:48:51 +01:00
|
|
|
name = "testssl.sh-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "drwetter";
|
|
|
|
repo = "testssl.sh";
|
|
|
|
rev = "v${version}";
|
2018-09-24 16:40:24 +01:00
|
|
|
sha256 = "02xp0yi53xf6jw6v633zs2ws2iyyvq3mlkimg0cv3zvj7nw9x5wr";
|
2017-09-23 10:48:51 +01:00
|
|
|
};
|
|
|
|
|
2018-04-14 20:17:44 +01: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 10:48:51 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
2018-04-09 17:49:50 +01:00
|
|
|
substituteInPlace testssl.sh \
|
2018-04-14 20:17:44 +01:00
|
|
|
--replace /bin/pwd pwd \
|
|
|
|
--replace TESTSSL_INSTALL_DIR:-\"\" TESTSSL_INSTALL_DIR:-\"$out\"
|
2017-09-23 10:48:51 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-04-14 20:17:44 +01:00
|
|
|
install -Dt $out/bin testssl.sh
|
|
|
|
|
|
|
|
wrapProgram $out/bin/testssl.sh \
|
|
|
|
--prefix PATH ':' ${lib.makeBinPath buildInputs}
|
|
|
|
|
|
|
|
cp -r etc $out
|
2017-09-23 10:48:51 +01: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.
|
|
|
|
'';
|
|
|
|
homepage = https://testssl.sh/;
|
|
|
|
license = licenses.gpl2;
|
2018-04-14 20:17:44 +01:00
|
|
|
maintainers = with maintainers; [ etu ];
|
2017-09-23 10:48:51 +01:00
|
|
|
};
|
|
|
|
}
|