diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pyuptimerobot/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pyuptimerobot/default.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pyuptimerobot/default.nix b/nixpkgs/pkgs/development/python-modules/pyuptimerobot/default.nix new file mode 100644 index 000000000000..6334c3f64c08 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/pyuptimerobot/default.nix @@ -0,0 +1,51 @@ +{ lib +, aiohttp +, aresponses +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pytest-asyncio +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pyuptimerobot"; + version = "21.11.0"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "ludeeus"; + repo = pname; + rev = version; + sha256 = "1nmmwp9m38b75lz51ypcj0qxnxm9wq4id5cggl0pn2rx6gwnbw9n"; + }; + + propagatedBuildInputs = [ + aiohttp + ]; + + checkInputs = [ + aresponses + pytestCheckHook + pytest-asyncio + ]; + + postPatch = '' + # Upstream doesn't set version in the repo + substituteInPlace setup.py \ + --replace 'version="main",' 'version="${version}",' + ''; + + pythonImportsCheck = [ + "pyuptimerobot" + ]; + + meta = with lib; { + description = "Python API wrapper for Uptime Robot"; + homepage = "https://github.com/ludeeus/pyuptimerobot"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} |