nixpkgs/pkgs/development/python-modules/hug/default.nix

53 lines
1.2 KiB
Nix
Raw Normal View History

2019-09-14 12:56:53 +00:00
{ lib , buildPythonPackage, fetchFromGitHub, isPy27
, falcon
, requests
, pytestCheckHook
2019-09-14 12:56:53 +00:00
, marshmallow
, mock
, numpy
}:
buildPythonPackage rec {
pname = "hug";
2019-09-13 17:07:30 +00:00
version = "2.6.0";
disabled = isPy27;
2019-09-14 12:56:53 +00:00
src = fetchFromGitHub {
owner = "hugapi";
repo = pname;
rev = version;
sha256 = "05rsv16g7ph100p8kl4l2jba0y4wcpp3xblc02mfp67zp1279vaq";
};
propagatedBuildInputs = [ falcon requests ];
checkInputs = [ mock marshmallow pytestCheckHook numpy ];
postPatch = ''
substituteInPlace setup.py --replace '"pytest-runner"' ""
'';
preCheck = ''
# some tests need the `hug` CLI on the PATH
export PATH=$out/bin:$PATH
2019-09-14 12:56:53 +00:00
'';
disabledTests = [
# some tests attempt network access
"test_datagram_request"
"test_request"
# these tests use an unstable test dependency (https://github.com/hugapi/hug/issues/859)
"test_marshmallow_custom_context"
"test_marshmallow_schema"
"test_transform"
"test_validate_route_args_negative_case"
];
2019-09-13 17:07:30 +00:00
meta = with lib; {
description = "A Python framework that makes developing APIs as simple as possible, but no simpler";
homepage = "https://github.com/hugapi/hug";
license = licenses.mit;
};
}