diff --git a/pkgs/development/python-modules/apcaccess/default.nix b/pkgs/development/python-modules/apcaccess/default.nix new file mode 100644 index 00000000000..4b1401d61e5 --- /dev/null +++ b/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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9705d6f1f10..21b2b75caf3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -511,6 +511,8 @@ in { apache-airflow = callPackage ../development/python-modules/apache-airflow { }; + apcaccess = callPackage ../development/python-modules/apcaccess { }; + apipkg = callPackage ../development/python-modules/apipkg { }; apispec = callPackage ../development/python-modules/apispec { };