about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/testssl
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/applications/networking/testssl
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/testssl')
-rw-r--r--nixpkgs/pkgs/applications/networking/testssl/default.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/networking/testssl/default.nix b/nixpkgs/pkgs/applications/networking/testssl/default.nix
new file mode 100644
index 000000000000..4a1f71f4b4f7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/testssl/default.nix
@@ -0,0 +1,52 @@
+{ stdenv, fetchFromGitHub, makeWrapper, lib
+, dnsutils, coreutils, openssl, nettools, utillinux, procps }:
+
+let
+  version = "2.9.5-7";
+
+in stdenv.mkDerivation rec {
+  name = "testssl.sh-${version}";
+
+  src = fetchFromGitHub {
+    owner = "drwetter";
+    repo = "testssl.sh";
+    rev = "v${version}";
+    sha256 = "02xp0yi53xf6jw6v633zs2ws2iyyvq3mlkimg0cv3zvj7nw9x5wr";
+  };
+
+  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\"
+  '';
+
+  installPhase = ''
+    install -Dt $out/bin testssl.sh
+
+    wrapProgram $out/bin/testssl.sh                                            \
+      --prefix PATH ':' ${lib.makeBinPath buildInputs}
+
+    cp -r etc $out
+  '';
+
+  meta = with stdenv.lib; {
+    description = "CLI tool to check a server's TLS/SSL capabilities";
+    longDescription = ''
+      CLI tool which checks a server's service on any port for the support of
+      TLS/SSL ciphers, protocols as well as recent cryptographic flaws and more.
+    '';
+    homepage = https://testssl.sh/;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ etu ];
+  };
+}