testssl: refactor and improve expression

gstqt5
Elis Hirwing 2017-12-27 13:23:59 +01:00
parent 5c66d653a2
commit f3ec623b70
No known key found for this signature in database
GPG Key ID: D57EFA625C9A925F
1 changed files with 5 additions and 3 deletions

View File

@ -1,7 +1,11 @@
{ stdenv, fetchFromGitHub, pkgs }:
stdenv.mkDerivation rec {
let
version = "2.9.5-1";
pwdBinPath = "${stdenv.lib.makeBinPath (with pkgs; [ coreutils ])}/pwd";
opensslBinPath = "${stdenv.lib.makeBinPath (with pkgs; [ openssl ])}/openssl";
in stdenv.mkDerivation rec {
name = "testssl.sh-${version}";
src = fetchFromGitHub {
@ -17,8 +21,6 @@ stdenv.mkDerivation rec {
patches = [ ./testssl.patch ];
pwdBinPath = "${stdenv.lib.makeBinPath (with pkgs; [ coreutils ])}/pwd";
opensslBinPath = "${stdenv.lib.makeBinPath (with pkgs; [ openssl ])}/openssl";
postPatch = ''
sed -i -e "s|/bin/pwd|${pwdBinPath}|g" \
-e "s|TESTSSL_INSTALL_DIR:-\"\"|TESTSSL_INSTALL_DIR:-\"$out\"|g" \