at 24.05-pre 1.3 kB view raw
1{ lib , buildPythonPackage, fetchFromGitHub, isPy27 2, falcon 3, requests 4, pytestCheckHook 5, marshmallow 6, mock 7, numpy 8}: 9 10buildPythonPackage rec { 11 pname = "hug"; 12 version = "2.6.0"; 13 disabled = isPy27; 14 15 src = fetchFromGitHub { 16 owner = "hugapi"; 17 repo = pname; 18 rev = version; 19 sha256 = "05rsv16g7ph100p8kl4l2jba0y4wcpp3xblc02mfp67zp1279vaq"; 20 }; 21 22 propagatedBuildInputs = [ falcon requests ]; 23 24 nativeCheckInputs = [ mock marshmallow pytestCheckHook numpy ]; 25 26 postPatch = '' 27 substituteInPlace setup.py --replace '"pytest-runner"' "" 28 ''; 29 30 preCheck = '' 31 # some tests need the `hug` CLI on the PATH 32 export PATH=$out/bin:$PATH 33 ''; 34 35 disabledTests = [ 36 # some tests attempt network access 37 "test_datagram_request" 38 "test_request" 39 # these tests use an unstable test dependency (https://github.com/hugapi/hug/issues/859) 40 "test_marshmallow_custom_context" 41 "test_marshmallow_schema" 42 "test_transform" 43 "test_validate_route_args_negative_case" 44 ]; 45 46 meta = with lib; { 47 description = "A Python framework that makes developing APIs as simple as possible, but no simpler"; 48 homepage = "https://github.com/hugapi/hug"; 49 license = licenses.mit; 50 # Missing support for later falcon releases 51 broken = true; 52 }; 53}