about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/nagiosplugin/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/nagiosplugin/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/nagiosplugin/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/nagiosplugin/default.nix b/nixpkgs/pkgs/development/python-modules/nagiosplugin/default.nix
new file mode 100644
index 000000000000..ef46e7ccafd4
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/nagiosplugin/default.nix
@@ -0,0 +1,32 @@
+{ lib
+, buildPythonPackage
+, twine
+, numpy
+, pytest
+, fetchPypi
+}:
+
+buildPythonPackage rec {
+  pname = "nagiosplugin";
+  version = "1.3.2";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1vr3zy0zfvbrqc4nf81zxv4gs2q82sv5sjamdm4573ld529mk2nv";
+  };
+
+  nativeBuildInputs = [ twine ];
+  checkInputs = [ pytest numpy ];
+
+  checkPhase = ''
+    # this test relies on who, which does not work in the sandbox
+    pytest -k "not test_check_users" tests/
+  '';
+
+  meta = with lib; {
+    description = "A Python class library which helps with writing Nagios (Icinga) compatible plugins";
+    homepage =  https://github.com/mpounsett/nagiosplugin;
+    license = licenses.zpl21;
+    maintainers = with maintainers; [ symphorien ];
+  };
+}