1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 mock, 6 pytestCheckHook, 7 pythonOlder, 8 requests, 9 requests-mock, 10 setuptools, 11}: 12 13buildPythonPackage rec { 14 pname = "py-canary"; 15 version = "0.5.4"; 16 format = "pyproject"; 17 18 disabled = pythonOlder "3.6"; 19 20 src = fetchFromGitHub { 21 owner = "snjoetw"; 22 repo = "py-canary"; 23 tag = version; 24 hash = "sha256-zylWkssU85eSfR+Di7vQGTr6hOQkqXCObv/PCDHoKHA="; 25 }; 26 27 nativeBuildInputs = [ setuptools ]; 28 29 propagatedBuildInputs = [ requests ]; 30 31 nativeCheckInputs = [ 32 mock 33 pytestCheckHook 34 requests-mock 35 ]; 36 37 pythonImportsCheck = [ "canary" ]; 38 39 disabledTests = [ 40 # Test requires network access 41 "test_location_with_motion_entry" 42 ]; 43 44 meta = with lib; { 45 description = "Python package for Canary Security Camera"; 46 homepage = "https://github.com/snjoetw/py-canary"; 47 license = licenses.mit; 48 maintainers = with maintainers; [ fab ]; 49 }; 50}