From 38b1f6197c5e29f74fc2fde7aabf18d7c9655dfd Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 30 Apr 2019 20:14:17 +0200 Subject: ssh-audit: init at 1.7.0 --- pkgs/tools/security/ssh-audit/default.nix | 53 +++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 pkgs/tools/security/ssh-audit/default.nix (limited to 'pkgs/tools/security/ssh-audit/default.nix') diff --git a/pkgs/tools/security/ssh-audit/default.nix b/pkgs/tools/security/ssh-audit/default.nix new file mode 100644 index 000000000000..e615cec945dd --- /dev/null +++ b/pkgs/tools/security/ssh-audit/default.nix @@ -0,0 +1,53 @@ +{ fetchFromGitHub, python3Packages, stdenv }: + +python3Packages.buildPythonPackage rec { + pname = "ssh-audit"; + version = "1.7.0"; + + src = fetchFromGitHub { + owner = "arthepsy"; + repo = pname; + rev = "refs/tags/v${version}"; + sha256 = "0akrychkdym9f6830ysq787c9nc0bkyqvy4h72498lyghwvwc2ms"; + }; + + checkInputs = [ + python3Packages.pytest + python3Packages.pytestcov + ]; + + checkPhase = '' + py.test --cov-report= --cov=ssh-audit -v test + ''; + + postPatch = '' + printf %s "$setupPy" > setup.py + mkdir scripts + cp ssh-audit.py scripts/ssh-audit + mkdir ssh_audit + cp ssh-audit.py ssh_audit/__init__.py + ''; + + setupPy = /* py */ '' + from distutils.core import setup + setup( + author='arthepsy', + description='${meta.description}', + license='${meta.license.spdxId}', + name='${pname}', + packages=['ssh_audit'], + scripts=['scripts/ssh-audit'], + url='${meta.homepage}', + version='${version}', + ) + ''; + + meta = { + description = "Tool for ssh server auditing"; + homepage = "https://github.com/arthepsy/ssh-audit"; + license = stdenv.lib.licenses.mit; + maintainers = [ + stdenv.lib.maintainers.tv + ]; + }; +} -- cgit 1.4.1