nautilus: fix cross compilation (#373662)
[NixPkgs.git] / pkgs / development / python-modules / nexia / default.nix
blob5af0cf1351d8fe69a49c81ea97a5a985eaab7df8
2   lib,
3   aioresponses,
4   buildPythonPackage,
5   orjson,
6   fetchFromGitHub,
7   pytest-asyncio,
8   pytestCheckHook,
9   pythonOlder,
10   requests,
11   requests-mock,
12   setuptools,
15 buildPythonPackage rec {
16   pname = "nexia";
17   version = "2.0.8";
18   pyproject = true;
20   disabled = pythonOlder "3.9";
22   src = fetchFromGitHub {
23     owner = "bdraco";
24     repo = "nexia";
25     tag = version;
26     hash = "sha256-dWFARVmGGQxyRhaOrDoAjwXTQNKBFHY2/swFVdEOsmo=";
27   };
29   postPatch = ''
30     substituteInPlace setup.py \
31       --replace '"pytest-runner",' ""
32   '';
34   nativeBuildInputs = [ setuptools ];
36   propagatedBuildInputs = [
37     orjson
38     requests
39   ];
41   nativeCheckInputs = [
42     aioresponses
43     requests-mock
44     pytest-asyncio
45     pytestCheckHook
46   ];
48   pythonImportsCheck = [ "nexia" ];
50   meta = with lib; {
51     description = "Python module for Nexia thermostats";
52     homepage = "https://github.com/bdraco/nexia";
53     changelog = "https://github.com/bdraco/nexia/releases/tag/${version}";
54     license = with licenses; [ asl20 ];
55     maintainers = with maintainers; [ fab ];
56   };