Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / crownstone-cloud / default.nix
blobd8ee18a090d4bc5af66688639d69077b3d3ab5b7
1 { lib
2 , aiohttp
3 , buildPythonPackage
4 , fetchFromGitHub
5 , fetchpatch
6 , certifi
7 , pythonOlder
8 , pytestCheckHook
9 }:
11 buildPythonPackage rec {
12   pname = "crownstone-cloud";
13   version = "1.4.9";
14   format = "setuptools";
16   disabled = pythonOlder "3.8";
18   src = fetchFromGitHub {
19     owner = "crownstone";
20     repo = "crownstone-lib-python-cloud";
21     rev = "refs/tags/${version}";
22     hash = "sha256-CS1zeQiWPnsGCWixCsN9sz08mPORW5sVqIpSFPh0Qt0=";
23   };
25   patches = [
26     # Remove asynctest, https://github.com/crownstone/crownstone-lib-python-cloud/pull/4
27     (fetchpatch {
28       name = "remove-asynctest.patch";
29       url = "https://github.com/crownstone/crownstone-lib-python-cloud/commit/7f22c9b284bf8d7f6f43e205816787dd3bb37e78.patch";
30       hash = "sha256-LS1O9LVB14WyBXfuHf/bs1juJ59zWhJ8pL4aGtVrTG8=";
31     })
32   ];
34   propagatedBuildInputs = [
35     aiohttp
36     certifi
37   ];
39   nativeCheckInputs = [
40     pytestCheckHook
41   ];
43   postPatch = ''
44     sed -i '/codecov/d' requirements.txt
45   '';
47   pythonImportsCheck = [
48     "crownstone_cloud"
49   ];
51   meta = with lib; {
52     description = "Python module for communicating with Crownstone Cloud and devices";
53     homepage = "https://github.com/crownstone/crownstone-lib-python-cloud";
54     license = with licenses; [ mit ];
55     maintainers = with maintainers; [ fab ];
56   };