summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2019-05-14 19:02:02 +0200
committerjeschli <jeschli@gmail.com>2019-05-14 19:02:02 +0200
commite869a8a82ad32aacf235b846c4d14a1791745c56 (patch)
tree1ff8687992a78a39513acd1c6da13adc794d0abc /krebs/5pkgs/simple
parent3899d0195c6077174e2d416c490dfae8783acee5 (diff)
parente9f96d7757f48000c6c4a4c1317bf4debab16a27 (diff)
Merge branch 'master' of prism.r:stockholm
Diffstat (limited to 'krebs/5pkgs/simple')
-rw-r--r--krebs/5pkgs/simple/prison-break/default.nix20
-rw-r--r--krebs/5pkgs/simple/prison-break/straight-plugin.nix22
-rw-r--r--krebs/5pkgs/simple/ssh-audit.nix55
3 files changed, 97 insertions, 0 deletions
diff --git a/krebs/5pkgs/simple/prison-break/default.nix b/krebs/5pkgs/simple/prison-break/default.nix
new file mode 100644
index 000000000..051a46184
--- /dev/null
+++ b/krebs/5pkgs/simple/prison-break/default.nix
@@ -0,0 +1,20 @@
+{pkgs, fetchFromGitHub}:
+with pkgs.python3.pkgs;
+
+buildPythonPackage rec {
+ pname = "prison-break";
+ version = "1.0.0";
+ src = fetchFromGitHub {
+ owner = "makefu";
+ repo = pname;
+ rev = "1.0.0";
+ sha256 = "0ab42z6qr42vz4fc077irn9ykrrylagx1dzlw8dqcanf49dxd961";
+ };
+ propagatedBuildInputs = [
+ docopt
+ requests
+ beautifulsoup4
+ (callPackage ./straight-plugin.nix {})
+ ];
+ checkInputs = [ black ];
+}
diff --git a/krebs/5pkgs/simple/prison-break/straight-plugin.nix b/krebs/5pkgs/simple/prison-break/straight-plugin.nix
new file mode 100644
index 000000000..606c60b5d
--- /dev/null
+++ b/krebs/5pkgs/simple/prison-break/straight-plugin.nix
@@ -0,0 +1,22 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+}:
+
+buildPythonPackage rec {
+ pname = "straight-plugin";
+ version = "1.5.0";
+
+ src = fetchPypi {
+ pname = "straight.plugin";
+ inherit version;
+ sha256 = "818a7641068932ed6436d0af0a3bb77bbbde29df0a7142c8bd1a249e7c2f0d38";
+ };
+
+ meta = with lib; {
+ description = "A simple namespaced plugin facility";
+ homepage = https://github.com/ironfroggy/straight.plugin;
+ license = licenses.mit;
+ maintainers = [ maintainers.makefu ];
+ };
+}
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";
+ };
+}