diff options
author | lassulus <lassulus@lassul.us> | 2019-05-05 10:28:52 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2019-05-05 10:28:52 +0200 |
commit | 595574d4338e12c53b5f4c8c9e2c087bc668b7b5 (patch) | |
tree | e3627161b3640f77a0f4141ce2e4b55d5b502d7c /krebs/5pkgs/simple/ssh-audit.nix | |
parent | 397fad23666f0705f03af166ad0b9a7d87104e4d (diff) | |
parent | df6007c2eb3c6fab9106c3fc591fded7221b1708 (diff) |
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'krebs/5pkgs/simple/ssh-audit.nix')
-rw-r--r-- | krebs/5pkgs/simple/ssh-audit.nix | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/krebs/5pkgs/simple/ssh-audit.nix b/krebs/5pkgs/simple/ssh-audit.nix new file mode 100644 index 000000000..7d2e6fb34 --- /dev/null +++ b/krebs/5pkgs/simple/ssh-audit.nix @@ -0,0 +1,55 @@ +{ fetchFromGitHub, python3Packages, stdenv }: + +python3Packages.buildPythonPackage rec { + inherit (meta) version; + + pname = "ssh-audit"; + + src = fetchFromGitHub { + owner = "arthepsy"; + repo = pname; + rev = "refs/tags/v${meta.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 + ]; + version = "1.7.0"; + }; +} |