1{ lib 2, aiohttp 3, buildPythonPackage 4, fetchFromGitHub 5, fetchpatch 6, certifi 7, pythonOlder 8, pytestCheckHook 9}: 10 11buildPythonPackage rec { 12 pname = "crownstone-cloud"; 13 version = "1.4.9"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.8"; 17 18 src = fetchFromGitHub { 19 owner = "crownstone"; 20 repo = "crownstone-lib-python-cloud"; 21 rev = "refs/tags/${version}"; 22 hash = "sha256-CS1zeQiWPnsGCWixCsN9sz08mPORW5sVqIpSFPh0Qt0="; 23 }; 24 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 ]; 33 34 propagatedBuildInputs = [ 35 aiohttp 36 certifi 37 ]; 38 39 nativeCheckInputs = [ 40 pytestCheckHook 41 ]; 42 43 postPatch = '' 44 sed -i '/codecov/d' requirements.txt 45 ''; 46 47 pythonImportsCheck = [ 48 "crownstone_cloud" 49 ]; 50 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 }; 57}