diff options
Diffstat (limited to 'pkgs/development/python-modules/pyrainbird/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pyrainbird/default.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pyrainbird/default.nix b/pkgs/development/python-modules/pyrainbird/default.nix new file mode 100644 index 0000000000000..74f0ed630a26e --- /dev/null +++ b/pkgs/development/python-modules/pyrainbird/default.nix @@ -0,0 +1,58 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, parameterized +, pycryptodome +, pytestCheckHook +, pythonOlder +, pyyaml +, requests +, responses +, setuptools +}: + +buildPythonPackage rec { + pname = "pyrainbird"; + version = "0.4.3"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "jbarrancos"; + repo = pname; + rev = version; + hash = "sha256-uRHknWvoPKPu3B5MbSEUlWqBKwAbNMwsgXuf6PZxhkU="; + }; + + propagatedBuildInputs = [ + pycryptodome + pyyaml + requests + setuptools + ]; + + checkInputs = [ + pytestCheckHook + parameterized + responses + ]; + + postPatch = '' + substituteInPlace requirements.txt \ + --replace "datetime" "" + substituteInPlace pytest.ini \ + --replace "--cov=pyrainbird --cov-report=term-missing --pep8 --flakes --mccabe" "" + ''; + + pythonImportsCheck = [ + "pyrainbird" + ]; + + meta = with lib; { + description = "Module to interact with Rainbird controllers"; + homepage = "https://github.com/jbarrancos/pyrainbird/"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} |