Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / elgato / default.nix
blob3aeab819b76a5d8812b89e2a6d771bb9566df368
1 { lib
2 , aiohttp
3 , aresponses
4 , buildPythonPackage
5 , fetchFromGitHub
6 , poetry-core
7 , pydantic
8 , pytest-asyncio
9 , pytestCheckHook
10 , pythonOlder
11 , yarl
14 buildPythonPackage rec {
15   pname = "elgato";
16   version = "5.0.0";
17   format = "pyproject";
19   disabled = pythonOlder "3.11";
21   src = fetchFromGitHub {
22     owner = "frenck";
23     repo = "python-elgato";
24     rev = "refs/tags/v${version}";
25     hash = "sha256-TI5wu2FYVUMvgDkbktcwPLnTSD8XUSy8qwOCdrsiopk=";
26   };
28   postPatch = ''
29     # Upstream doesn't set a version for the pyproject.toml
30     substituteInPlace pyproject.toml \
31       --replace "0.0.0" "${version}" \
32       --replace "--cov" ""
33   '';
35   nativeBuildInputs = [
36     poetry-core
37   ];
39   propagatedBuildInputs = [
40     aiohttp
41     pydantic
42     yarl
43   ];
45   nativeCheckInputs = [
46     aresponses
47     pytest-asyncio
48     pytestCheckHook
49   ];
51   pythonImportsCheck = [
52     "elgato"
53   ];
55   meta = with lib; {
56     description = "Python client for Elgato Key Lights";
57     homepage = "https://github.com/frenck/python-elgato";
58     changelog = "https://github.com/frenck/python-elgato/releases/tag/v${version}";
59     license = with licenses; [ mit ];
60     maintainers = with maintainers; [ fab ];
61   };