2017-09-23 11:48:51 +02:00
|
|
|
{ stdenv, fetchFromGitHub, pkgs }:
|
|
|
|
|
2017-12-27 13:23:59 +01:00
|
|
|
let
|
2018-04-09 18:49:50 +02:00
|
|
|
version = "2.9.5-4";
|
2017-12-27 13:23:59 +01:00
|
|
|
pwdBinPath = "${stdenv.lib.makeBinPath (with pkgs; [ coreutils ])}/pwd";
|
|
|
|
opensslBinPath = "${stdenv.lib.makeBinPath (with pkgs; [ openssl ])}/openssl";
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2017-09-23 11:48:51 +02:00
|
|
|
name = "testssl.sh-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "drwetter";
|
|
|
|
repo = "testssl.sh";
|
|
|
|
rev = "v${version}";
|
2018-04-09 18:49:50 +02:00
|
|
|
sha256 = "0pfp7r4jhvkh06vawqlvq7vp4imwp6dpq6jx8m0k3j85ywwp45pd";
|
2017-09-23 11:48:51 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./testssl.patch ];
|
|
|
|
|
|
|
|
postPatch = ''
|
2018-04-09 18:49:50 +02:00
|
|
|
substituteInPlace testssl.sh \
|
|
|
|
--replace /bin/pwd ${pwdBinPath} \
|
|
|
|
--replace TESTSSL_INSTALL_DIR:-\"\" TESTSSL_INSTALL_DIR:-\"$out\" \
|
|
|
|
--replace @@openssl-path@@ ${opensslBinPath}
|
2017-09-23 11:48:51 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/etc
|
|
|
|
cp -r etc/ $out/
|
|
|
|
cp testssl.sh $out/bin/testssl.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
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;
|
|
|
|
maintainers = [ maintainers.etu ];
|
|
|
|
};
|
|
|
|
}
|