2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchFromGitHub, makeWrapper, lib
|
2020-11-24 20:58:05 +00:00
|
|
|
, dnsutils, coreutils, openssl, nettools, util-linux, procps }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "testssl.sh";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "3.0.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "drwetter";
|
|
|
|
repo = pname;
|
2021-10-04 12:37:57 +00:00
|
|
|
rev = "v${version}";
|
2022-09-30 11:47:45 +00:00
|
|
|
sha256 = "sha256-gkDtJlAC7woM2HyYDXntD1+bEuqHTEipqrn2EZjxnH8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [
|
2021-10-04 12:37:57 +00:00
|
|
|
coreutils # for printf
|
2020-04-24 23:36:52 +00:00
|
|
|
dnsutils # for dig
|
|
|
|
nettools # for hostname
|
|
|
|
openssl # for openssl
|
|
|
|
procps # for ps
|
2020-11-24 20:58:05 +00:00
|
|
|
util-linux # for hexdump
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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}
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00: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.
|
|
|
|
'';
|
|
|
|
homepage = "https://testssl.sh/";
|
2021-06-28 23:13:55 +00:00
|
|
|
license = licenses.gpl2Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ etu ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "testssl.sh";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|