about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/apcaccess/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/apcaccess/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/apcaccess/default.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/apcaccess/default.nix b/nixpkgs/pkgs/development/python-modules/apcaccess/default.nix
new file mode 100644
index 000000000000..4b1401d61e57
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/apcaccess/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "apcaccess";
+  version = "0.0.13";
+
+  src = fetchFromGitHub {
+    owner = "flyte";
+    repo = "apcaccess";
+    rev = version;
+    sha256 = "sha256-XLoNRh6MgXCfRtWD9NpVZSyroW6E9nRYw6Grxa+AQkc=";
+  };
+
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace "setup_requires='pytest-runner'," ""
+  '';
+
+  pythonImportsCheck = [
+    "apcaccess"
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  meta = with lib; {
+    description = "Library offers programmatic access to the status information provided by apcupsd over its Network Information Server";
+    homepage = "https://github.com/flyte/apcaccess";
+    license = licenses.mit;
+    maintainers = with maintainers; [ uvnikita ];
+  };
+}