Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / p1monitor / default.nix
blob48d2044031f188a69e653cbcf20818ffe3490715
1 { lib
2 , aiohttp
3 , aresponses
4 , buildPythonPackage
5 , fetchFromGitHub
6 , poetry-core
7 , pytest-asyncio
8 , pytestCheckHook
9 , pythonOlder
10 , yarl
13 buildPythonPackage rec {
14   pname = "p1monitor";
15   version = "2.3.1";
16   format = "pyproject";
18   disabled = pythonOlder "3.9";
20   src = fetchFromGitHub {
21     owner = "klaasnicolaas";
22     repo = "python-p1monitor";
23     rev = "refs/tags/v${version}";
24     hash = "sha256-2NlFXeI+6ooh4D1OxUWwYrmM4zpL9gg8vhnseLjj2dM=";
25   };
27   nativeBuildInputs = [
28     poetry-core
29   ];
31   propagatedBuildInputs = [
32     aiohttp
33     yarl
34   ];
36   nativeCheckInputs = [
37     aresponses
38     pytest-asyncio
39     pytestCheckHook
40   ];
42   postPatch = ''
43     substituteInPlace pyproject.toml \
44       --replace '"0.0.0"' '"${version}"' \
45       --replace 'addopts = "--cov"' ""
46   '';
48   pythonImportsCheck = [
49     "p1monitor"
50   ];
52   meta = with lib; {
53     description = "Module for interacting with the P1 Monitor";
54     homepage = "https://github.com/klaasnicolaas/python-p1monitor";
55     changelog = "https://github.com/klaasnicolaas/python-p1monitor/releases/tag/v${version}";
56     license = with licenses; [ mit ];
57     maintainers = with maintainers; [ fab ];
58   };