1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 setuptools, 6 requests, 7 websocket-client, 8 python-magic, 9 cryptography, 10 pytestCheckHook, 11 pythonAtLeast, 12}: 13 14buildPythonPackage rec { 15 pname = "pushbullet-py"; 16 version = "0.12.0"; 17 pyproject = true; 18 19 src = fetchPypi { 20 inherit pname version; 21 sha256 = "917883e1af4a0c979ce46076b391e0243eb8fe0a81c086544bcfa10f53e5ae64"; 22 }; 23 24 nativeBuildInputs = [ setuptools ]; 25 26 propagatedBuildInputs = [ 27 cryptography 28 python-magic 29 requests 30 websocket-client 31 ]; 32 33 preCheck = '' 34 export PUSHBULLET_API_KEY="" 35 ''; 36 37 nativeCheckInputs = [ pytestCheckHook ]; 38 39 disabledTests = [ 40 "test_auth_fail" 41 "test_auth_success" 42 "test_decryption" 43 ] 44 ++ lib.optionals (pythonAtLeast "3.12") [ 45 # AttributeError: 'called_once_with' is not a valid assertion. Use a spec for the mock if 'called_once_with' is meant to be an attribute.. Did you mean: 'assert_called_once_with'? 46 "test_new_device_ok" 47 "test_new_chat_ok" 48 ]; 49 50 meta = with lib; { 51 description = "Simple python client for pushbullet.com"; 52 homepage = "https://github.com/randomchars/pushbullet.py"; 53 license = licenses.mit; 54 }; 55}