Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / iaqualink / default.nix
blob6e72b5a8519b58dfd906a8b3e930c869570fdf6d
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , hatch-vcs
5 , hatchling
6 , httpx
7 , pytestCheckHook
8 , pythonOlder
9 , respx
12 buildPythonPackage rec {
13   pname = "iaqualink";
14   version = "0.5.0";
15   format = "pyproject";
17   disabled = pythonOlder "3.8";
19   src = fetchFromGitHub {
20     owner = "flz";
21     repo = "iaqualink-py";
22     rev = "v${version}";
23     hash = "sha256-ewPP2Xq+ecZGc5kokvLEsRokGqTWlymrzkwk480tapk=";
24   };
26   SETUPTOOLS_SCM_PRETEND_VERSION = version;
28   nativeBuildInputs = [
29     hatch-vcs
30     hatchling
31   ];
33   propagatedBuildInputs = [
34     httpx
35   ] ++ httpx.optional-dependencies.http2;
37   nativeCheckInputs = [
38     pytestCheckHook
39     respx
40   ];
42   postPatch = ''
43     substituteInPlace pyproject.toml \
44       --replace "pytest --cov-config=pyproject.toml --cov-report=xml --cov-report=term --cov=src --cov=tests" ""
45   '';
47   pythonImportsCheck = [
48     "iaqualink"
49   ];
51   meta = with lib; {
52     description = "Python library for Jandy iAqualink";
53     homepage = "https://github.com/flz/iaqualink-py";
54     license = with licenses; [ bsd3 ];
55     maintainers = with maintainers; [ fab ];
56   };