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 let
version = "2.9.5-4"; version = "2.9.5-5";
pwdBinPath = "${stdenv.lib.makeBinPath (with pkgs; [ coreutils ])}/pwd";
opensslBinPath = "${stdenv.lib.makeBinPath (with pkgs; [ openssl ])}/openssl";
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
name = "testssl.sh-${version}"; name = "testssl.sh-${version}";
@ -12,22 +11,32 @@ in stdenv.mkDerivation rec {
owner = "drwetter"; owner = "drwetter";
repo = "testssl.sh"; repo = "testssl.sh";
rev = "v${version}"; 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 = '' postPatch = ''
substituteInPlace testssl.sh \ substituteInPlace testssl.sh \
--replace /bin/pwd ${pwdBinPath} \ --replace /bin/pwd pwd \
--replace TESTSSL_INSTALL_DIR:-\"\" TESTSSL_INSTALL_DIR:-\"$out\" \ --replace TESTSSL_INSTALL_DIR:-\"\" TESTSSL_INSTALL_DIR:-\"$out\"
--replace @@openssl-path@@ ${opensslBinPath}
''; '';
installPhase = '' installPhase = ''
mkdir -p $out/bin $out/etc install -Dt $out/bin testssl.sh
cp -r etc/ $out/
cp testssl.sh $out/bin/testssl.sh wrapProgram $out/bin/testssl.sh \
--prefix PATH ':' ${lib.makeBinPath buildInputs}
cp -r etc $out
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
@ -38,6 +47,6 @@ in stdenv.mkDerivation rec {
''; '';
homepage = https://testssl.sh/; homepage = https://testssl.sh/;
license = licenses.gpl2; 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