Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
wip
  • Loading branch information
peterhoeg committed Apr 15, 2019
1 parent acbdaa5 commit f3b387e
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions pkgs/applications/networking/testssl/default.nix
Expand Up @@ -2,10 +2,18 @@
, dnsutils, coreutils, openssl, nettools, utillinux, procps }:

let
version = "2.9.5-7";
binPath = lib.makeBinPath [
coreutils # for pwd and printf
dnsutils # for dig
nettools # for hostname
openssl # for openssl
procps # for ps
utillinux # for hexdump
];

in stdenv.mkDerivation rec {
name = "testssl.sh-${version}";
version = "2.9.5-7";

src = fetchFromGitHub {
owner = "drwetter";
Expand All @@ -15,28 +23,25 @@ in stdenv.mkDerivation rec {
};

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 pwd \
--replace TESTSSL_INSTALL_DIR:-\"\" TESTSSL_INSTALL_DIR:-\"$out\"
substituteInPlace testssl.sh \
--replace /bin/pwd pwd \
--replace 'TESTSSL_INSTALL_DIR:-""' TESTSSL_INSTALL_DIR:-\"$out\" \
--replace 'PROG_NAME="$(basename "$0")"' PROG_NAME="testssl.sh"
'';

installPhase = ''
runHook preInstall
install -Dt $out/bin testssl.sh
wrapProgram $out/bin/testssl.sh \
--prefix PATH ':' ${lib.makeBinPath buildInputs}
wrapProgram $out/bin/testssl.sh \
--prefix PATH ':' ${binPath}
cp -r etc $out
runHook postInstall
'';

meta = with stdenv.lib; {
Expand Down

0 comments on commit f3b387e

Please sign in to comment.