Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / ambee / default.nix
blob3e3f719b7afd27a7f9124119d182a46dff3cdb2b
1 { lib
2 , buildPythonPackage
3 , pythonOlder
4 , fetchFromGitHub
5 , aiohttp
6 , poetry-core
7 , yarl
8 , aresponses
9 , pytest-asyncio
10 , pytestCheckHook
13 buildPythonPackage rec {
14   pname = "ambee";
15   version = "0.4.0";
16   disabled = pythonOlder "3.8";
17   format = "pyproject";
19   src = fetchFromGitHub {
20     owner = "frenck";
21     repo = "python-ambee";
22     rev = "v${version}";
23     hash = "sha256-2wX2CLr6kdVw2AGPW6DmYI2OBfQFI/iWVorok2d3wx4=";
24   };
26   nativeBuildInputs = [
27     poetry-core
28   ];
30   propagatedBuildInputs = [
31     aiohttp
32     yarl
33   ];
35   nativeCheckInputs = [
36     aresponses
37     pytest-asyncio
38     pytestCheckHook
39   ];
41   postPatch = ''
42     # Upstream doesn't set a version for the pyproject.toml
43     substituteInPlace pyproject.toml \
44       --replace "0.0.0" "${version}" \
45       --replace "--cov" ""
46   '';
48   pythonImportsCheck = [ "ambee" ];
50   meta = with lib; {
51     description = "Python client for Ambee API";
52     homepage = "https://github.com/frenck/python-ambee";
53     license = with licenses; [ mit ];
54     maintainers = with maintainers; [ fab ];
55   };