about summary refs log tree commit diff
path: root/pkgs/applications/networking/testssl/default.nix
diff options
context:
space:
mode:
authorElis Hirwing <elis@hirwing.se>2018-04-14 21:17:44 +0200
committerRobert Schütz <rschuetz17@gmail.com>2018-04-14 21:17:44 +0200
commit8b19b14bdaafc472c7b29c4002aff1c5391e0685 (patch)
tree7aca86d62d957113449725b668228c4ca67c6913 /pkgs/applications/networking/testssl/default.nix
parent054f4f9c554b10812513ab502d559114ac6f51d2 (diff)
downloadnixlib-8b19b14bdaafc472c7b29c4002aff1c5391e0685.tar
nixlib-8b19b14bdaafc472c7b29c4002aff1c5391e0685.tar.gz
nixlib-8b19b14bdaafc472c7b29c4002aff1c5391e0685.tar.bz2
nixlib-8b19b14bdaafc472c7b29c4002aff1c5391e0685.tar.lz
nixlib-8b19b14bdaafc472c7b29c4002aff1c5391e0685.tar.xz
nixlib-8b19b14bdaafc472c7b29c4002aff1c5391e0685.tar.zst
nixlib-8b19b14bdaafc472c7b29c4002aff1c5391e0685.zip
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.
Diffstat (limited to 'pkgs/applications/networking/testssl/default.nix')
-rw-r--r--pkgs/applications/networking/testssl/default.nix35
1 files changed, 22 insertions, 13 deletions
diff --git a/pkgs/applications/networking/testssl/default.nix b/pkgs/applications/networking/testssl/default.nix
index 97c05dfafdbe..5a548d5ff65f 100644
--- a/pkgs/applications/networking/testssl/default.nix
+++ b/pkgs/applications/networking/testssl/default.nix
@@ -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 ];
   };
 }