testssl: 2.9.5-4 -> 2.9.5-5 (#38936)

Changelog:
https://github.com/drwetter/testssl.sh/releases/tag/v2.9.5-5

Also improved expression.
This commit is contained in:
Elis Hirwing 2018-04-14 21:17:44 +02:00 committed by Robert Schütz
parent 054f4f9c55
commit 8b19b14bda
2 changed files with 22 additions and 23 deletions

View File

@ -1,9 +1,8 @@
{ stdenv, fetchFromGitHub, pkgs }:
{ stdenv, fetchFromGitHub, makeWrapper, lib
, dnsutils, coreutils, openssl, nettools, utillinux, procps }:
let
version = "2.9.5-4";
pwdBinPath = "${stdenv.lib.makeBinPath (with pkgs; [ coreutils ])}/pwd";
opensslBinPath = "${stdenv.lib.makeBinPath (with pkgs; [ openssl ])}/openssl";
version = "2.9.5-5";
in stdenv.mkDerivation rec {
name = "testssl.sh-${version}";
@ -12,22 +11,32 @@ in stdenv.mkDerivation rec {
owner = "drwetter";
repo = "testssl.sh";
rev = "v${version}";
sha256 = "0pfp7r4jhvkh06vawqlvq7vp4imwp6dpq6jx8m0k3j85ywwp45pd";
sha256 = "0zgj9vhd8fv3a1cn8dxqmjd8qmgryc867gq7zbvbr41lkqc06a1r";
};
patches = [ ./testssl.patch ];
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
coreutils # for pwd and printf
dnsutils # for dig
nettools # for hostname
openssl # for openssl
procps # for ps
utillinux # for hexdump
];
postPatch = ''
substituteInPlace testssl.sh \
--replace /bin/pwd ${pwdBinPath} \
--replace TESTSSL_INSTALL_DIR:-\"\" TESTSSL_INSTALL_DIR:-\"$out\" \
--replace @@openssl-path@@ ${opensslBinPath}
--replace /bin/pwd pwd \
--replace TESTSSL_INSTALL_DIR:-\"\" TESTSSL_INSTALL_DIR:-\"$out\"
'';
installPhase = ''
mkdir -p $out/bin $out/etc
cp -r etc/ $out/
cp testssl.sh $out/bin/testssl.sh
install -Dt $out/bin testssl.sh
wrapProgram $out/bin/testssl.sh \
--prefix PATH ':' ${lib.makeBinPath buildInputs}
cp -r etc $out
'';
meta = with stdenv.lib; {
@ -38,6 +47,6 @@ in stdenv.mkDerivation rec {
'';
homepage = https://testssl.sh/;
license = licenses.gpl2;
maintainers = [ maintainers.etu ];
maintainers = with maintainers; [ etu ];
};
}

View File

@ -1,10 +0,0 @@
--- testssl/testssl.sh 2017-09-24 16:53:29.395263437 +0200
+++ testssl-new/testssl.sh 2017-09-24 16:53:41.221154492 +0200
@@ -165,6 +165,7 @@
# following variables make use of $ENV, e.g. OPENSSL=<myprivate_path_to_openssl> ./testssl.sh <host>
# 0 means (normally) true here. Some of the variables are also accessible with a command line switch, see --help
declare -x OPENSSL OPENSSL_TIMEOUT
+OPENSSL=${OPENSSL:-"@@openssl-path@@"}
FAST_SOCKET=${FAST_SOCKET:-false} # EXPERIMENTAL feature to accelerate sockets -- DO NOT USE it for production
COLOR=${COLOR:-2} # 2: Full color, 1: b/w+positioning, 0: no ESC at all
COLORBLIND=${COLORBLIND:-false} # if true, swap blue and green in the output