2024-06-05 15:53:02 +00:00
{
lib ,
buildPythonPackage ,
fetchPypi ,
setuptools ,
requests ,
websocket-client ,
python-magic ,
cryptography ,
pytestCheckHook ,
pythonAtLeast ,
2021-05-20 23:08:51 +00:00
} :
2020-04-24 23:36:52 +00:00
buildPythonPackage rec {
2022-10-21 18:38:19 +00:00
pname = " p u s h b u l l e t - p y " ;
2020-11-06 00:33:48 +00:00
version = " 0 . 1 2 . 0 " ;
2024-04-21 15:54:59 +00:00
pyproject = true ;
2020-04-24 23:36:52 +00:00
src = fetchPypi {
inherit pname version ;
2020-11-06 00:33:48 +00:00
sha256 = " 9 1 7 8 8 3 e 1 a f 4 a 0 c 9 7 9 c e 4 6 0 7 6 b 3 9 1 e 0 2 4 3 e b 8 f e 0 a 8 1 c 0 8 6 5 4 4 b c f a 1 0 f 5 3 e 5 a e 6 4 " ;
2020-04-24 23:36:52 +00:00
} ;
2024-06-05 15:53:02 +00:00
nativeBuildInputs = [ setuptools ] ;
2024-04-21 15:54:59 +00:00
propagatedBuildInputs = [
cryptography
python-magic
requests
websocket-client
] ;
2020-04-24 23:36:52 +00:00
2021-05-20 23:08:51 +00:00
preCheck = ''
export PUSHBULLET_API_KEY = " "
2020-04-24 23:36:52 +00:00
'' ;
2024-04-21 15:54:59 +00:00
2024-06-05 15:53:02 +00:00
nativeCheckInputs = [ pytestCheckHook ] ;
disabledTests =
[
" t e s t _ a u t h _ f a i l "
" t e s t _ a u t h _ s u c c e s s "
" t e s t _ d e c r y p t i o n "
]
++ lib . optionals ( pythonAtLeast " 3 . 1 2 " ) [
# 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'?
" t e s t _ n e w _ d e v i c e _ o k "
" t e s t _ n e w _ c h a t _ o k "
] ;
2020-04-24 23:36:52 +00:00
meta = with lib ; {
description = " A s i m p l e p y t h o n c l i e n t f o r p u s h b u l l e t . c o m " ;
homepage = " h t t p s : / / g i t h u b . c o m / r a n d o m c h a r s / p u s h b u l l e t . p y " ;
license = licenses . mit ;
} ;
}