@@ -1,17 +1,15 @@
1{ stdenv, fetchFromGitHub, makeWrapper, lib
1{ stdenv, fetchFromGitHub, makeWrapper, lib
2, dnsutils, coreutils, openssl, nettools, utillinux, procps }:
2, dnsutils, coreutils, openssl, nettools, utillinux, procps }:
7−in stdenv.mkDerivation rec {
4+stdenv.mkDerivation rec {
8− name = "testssl.sh-${version}";
5+ pname = "testssl.sh";
10 src = fetchFromGitHub {
8 src = fetchFromGitHub {
11 owner = "drwetter";
9 owner = "drwetter";
12− repo = "testssl.sh";
10+ repo = pname;
13− rev = "v${version}";
11+ rev = version;
14− sha256 = "02xp0yi53xf6jw6v633zs2ws2iyyvq3mlkimg0cv3zvj7nw9x5wr";
12+ sha256 = "14b9n0h4f2dsa292wi9gnan5ncgqblis6wyh5978lhjzi1d7gyds";
17 nativeBuildInputs = [ makeWrapper ];
15 nativeBuildInputs = [ makeWrapper ];
@@ -27,16 +25,15 @@ in stdenv.mkDerivation rec {
27 postPatch = ''
25 postPatch = ''
28 substituteInPlace testssl.sh \
26 substituteInPlace testssl.sh \
29 --replace /bin/pwd pwd \
27 --replace /bin/pwd pwd \
30− --replace TESTSSL_INSTALL_DIR:-\"\" TESTSSL_INSTALL_DIR:-\"$out\"
28+ --replace TESTSSL_INSTALL_DIR:-\"\" TESTSSL_INSTALL_DIR:-\"$out\" \
29+ --replace PROG_NAME=\"\$\(basename\ \"\$0\"\)\" PROG_NAME=\"testssl.sh\"
33 installPhase = ''
32 installPhase = ''
34− install -Dt $out/bin testssl.sh
33+ install -D testssl.sh $out/bin/testssl.sh
36− wrapProgram $out/bin/testssl.sh \
37− --prefix PATH ':' ${lib.makeBinPath buildInputs}
39 cp -r etc $out
34 cp -r etc $out
36+ wrapProgram $out/bin/testssl.sh --prefix PATH ':' ${lib.makeBinPath buildInputs}
42 meta = with stdenv.lib; {
39 meta = with stdenv.lib; {