mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-06 10:16:44 +01:00
49 lines
1.4 KiB
Nix
49 lines
1.4 KiB
Nix
{ stdenv, fetchFromGitHub, makeWrapper, lib
|
|
, dnsutils, coreutils, openssl, nettools, util-linux, procps }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "testssl.sh";
|
|
version = "3.0.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "drwetter";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "016qpsb4dv9qb3ab3hmvk4vzf4ipr3xgmzv2cx46pxxsj0gnigd8";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
buildInputs = [
|
|
coreutils # for printf
|
|
dnsutils # for dig
|
|
nettools # for hostname
|
|
openssl # for openssl
|
|
procps # for ps
|
|
util-linux # for hexdump
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace testssl.sh \
|
|
--replace TESTSSL_INSTALL_DIR:-\"\" TESTSSL_INSTALL_DIR:-\"$out\" \
|
|
--replace PROG_NAME=\"\$\(basename\ \"\$0\"\)\" PROG_NAME=\"testssl.sh\"
|
|
'';
|
|
|
|
installPhase = ''
|
|
install -D testssl.sh $out/bin/testssl.sh
|
|
cp -r etc $out
|
|
|
|
wrapProgram $out/bin/testssl.sh --prefix PATH ':' ${lib.makeBinPath buildInputs}
|
|
'';
|
|
|
|
meta = with 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.gpl2Only;
|
|
maintainers = with maintainers; [ etu ];
|
|
};
|
|
}
|