Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / moonraker-api / default.nix
blob9a0437ea056f1ba35a63b37e805c90bb39289024
1 { lib
2 , aiohttp
3 , buildPythonPackage
4 , fetchFromGitHub
5 , pytest-aiohttp
6 , pytestCheckHook
7 , pythonOlder
8 }:
10 buildPythonPackage rec {
11   pname = "moonraker-api";
12   version = "2.0.5";
13   format = "setuptools";
15   disabled = pythonOlder "3.8";
17   src = fetchFromGitHub {
18     owner = "cmroche";
19     repo = pname;
20     rev = "v${version}";
21     hash = "sha256-PgFsXmdAmHXK0wZ6xLTu94RdME1L2H1Mb6V+qFlGXSk=";
22   };
24   postPatch = ''
25     # see comment on https://github.com/cmroche/moonraker-api/commit/e5ca8ab60d2839e150a81182fbe65255d84b4e4e
26     substituteInPlace setup.py \
27       --replace 'name="moonraker-api",' 'name="moonraker-api",version="${version}",'
28   '';
30   propagatedBuildInputs = [
31     aiohttp
32   ];
34   nativeCheckInputs = [
35     pytest-aiohttp
36     pytestCheckHook
37   ];
39   pythonImportsCheck = [
40     "moonraker_api"
41   ];
43   meta = with lib; {
44     description = "Python API for the Moonraker API";
45     homepage = "https://github.com/cmroche/moonraker-api";
46     license = with licenses; [ gpl3Only ];
47     maintainers = with maintainers; [ fab ];
48   };