Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pyuptimerobot / default.nix
blob8b6af6dc5d921e55d34d47d34bfd5b5a565cba6f
1 { lib
2 , aiohttp
3 , aresponses
4 , buildPythonPackage
5 , fetchFromGitHub
6 , pytestCheckHook
7 , pytest-asyncio
8 , pythonOlder
9 }:
11 buildPythonPackage rec {
12   pname = "pyuptimerobot";
13   version = "23.1.0";
14   format = "setuptools";
16   disabled = pythonOlder "3.8";
18   src = fetchFromGitHub {
19     owner = "ludeeus";
20     repo = pname;
21     rev = "refs/tags/${version}";
22     hash = "sha256-hy/hmXxxEb44X8JUszoA1YF/41y7GkQqC4uS+Pax6WA=";
23   };
25   postPatch = ''
26     # Upstream doesn't set version in the repo
27     substituteInPlace setup.py \
28       --replace 'version="main",' 'version="${version}",'
29   '';
31   propagatedBuildInputs = [
32     aiohttp
33   ];
35   nativeCheckInputs = [
36     aresponses
37     pytestCheckHook
38     pytest-asyncio
39   ];
41   pythonImportsCheck = [
42     "pyuptimerobot"
43   ];
45   meta = with lib; {
46     description = "Python API wrapper for Uptime Robot";
47     homepage = "https://github.com/ludeeus/pyuptimerobot";
48     changelog = "https://github.com/ludeeus/pyuptimerobot/releases/tag/${version}";
49     license = licenses.mit;
50     maintainers = with maintainers; [ fab ];
51   };