Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, aiohttp 3, asynctest 4, buildPythonPackage 5, fetchFromGitHub 6, fetchpatch 7, certifi 8, pythonOlder 9, pytestCheckHook 10}: 11 12buildPythonPackage rec { 13 pname = "crownstone-cloud"; 14 version = "1.4.9"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.8"; 18 19 src = fetchFromGitHub { 20 owner = "crownstone"; 21 repo = "crownstone-lib-python-cloud"; 22 rev = "refs/tags/${version}"; 23 hash = "sha256-CS1zeQiWPnsGCWixCsN9sz08mPORW5sVqIpSFPh0Qt0="; 24 }; 25 26 patches = [ 27 # Remove asynctest, https://github.com/crownstone/crownstone-lib-python-cloud/pull/4 28 (fetchpatch { 29 name = "remove-asynctest.patch"; 30 url = "https://github.com/crownstone/crownstone-lib-python-cloud/commit/7f22c9b284bf8d7f6f43e205816787dd3bb37e78.patch"; 31 hash = "sha256-LS1O9LVB14WyBXfuHf/bs1juJ59zWhJ8pL4aGtVrTG8="; 32 }) 33 ]; 34 35 propagatedBuildInputs = [ 36 aiohttp 37 asynctest 38 certifi 39 ]; 40 41 nativeCheckInputs = [ 42 pytestCheckHook 43 ]; 44 45 postPatch = '' 46 sed -i '/codecov/d' requirements.txt 47 ''; 48 49 pythonImportsCheck = [ 50 "crownstone_cloud" 51 ]; 52 53 meta = with lib; { 54 description = "Python module for communicating with Crownstone Cloud and devices"; 55 homepage = "https://github.com/crownstone/crownstone-lib-python-cloud"; 56 license = with licenses; [ mit ]; 57 maintainers = with maintainers; [ fab ]; 58 }; 59}