2024-06-05 15:53:02 +00:00
{
lib ,
buildPythonPackage ,
fetchFromGitHub ,
plumbum ,
requests ,
setuptools ,
hypothesis ,
2024-06-20 14:57:18 +00:00
pytestCheckHook ,
2024-06-05 15:53:02 +00:00
responses ,
2021-06-28 23:13:55 +00:00
} :
buildPythonPackage rec {
pname = " h a b i t i p y " ;
2024-06-20 14:57:18 +00:00
version = " 0 . 3 . 1 " ;
pyproject = true ;
2021-06-28 23:13:55 +00:00
src = fetchFromGitHub {
owner = " A S M f r e a K " ;
repo = " h a b i t i p y " ;
2024-06-20 14:57:18 +00:00
# TODO: https://github.com/ASMfreaK/habitipy/issues/27
rev = " f a a c a 8 8 4 0 5 7 5 f e 8 b 8 0 7 b f 1 7 a c e a 6 2 6 6 d 5 c e 9 2 a 9 9 " ;
hash = " s h a 2 5 6 - B G F U A n t S N H 0 Y Y W n 9 n f K j I l p e v F 7 M F s 0 c s C P S p 6 I T 6 R o = " ;
2021-06-28 23:13:55 +00:00
} ;
2024-06-20 14:57:18 +00:00
build-system = [ setuptools ] ;
dependencies = [
2021-06-28 23:13:55 +00:00
plumbum
requests
setuptools
] ;
2023-02-02 18:25:31 +00:00
nativeCheckInputs = [
2021-06-28 23:13:55 +00:00
hypothesis
2024-06-20 14:57:18 +00:00
pytestCheckHook
2021-06-28 23:13:55 +00:00
responses
] ;
2024-06-20 14:57:18 +00:00
preCheck = ''
export HOME = $ TMPDIR
2021-06-28 23:13:55 +00:00
'' ;
2024-06-20 14:57:18 +00:00
disabledTests = [
# network access
" t e s t _ c o n t e n t _ c a c h e "
# hypothesis.errors.InvalidArgument: tests/test_cli.py::test_data is a function that returns a Hypothesis strategy, but pytest has collected it as a test function.
" t e s t _ d a t a "
] ;
2021-06-28 23:13:55 +00:00
pythonImportsCheck = [ " h a b i t i p y " ] ;
meta = with lib ; {
description = " T o o l s a n d l i b r a r y f o r H a b i t i c a r e s t f u l A P I " ;
2024-04-21 15:54:59 +00:00
mainProgram = " h a b i t i p y " ;
2021-06-28 23:13:55 +00:00
homepage = " h t t p s : / / g i t h u b . c o m / A S M f r e a K / h a b i t i p y " ;
license = licenses . mit ;
maintainers = with maintainers ; [ dotlambda ] ;
} ;
}