nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib , buildPythonPackage, fetchFromGitHub, isPy27
2, falcon
3, pytestrunner
4, requests
5, pytest
6, marshmallow
7, mock
8, numpy
9, isPy38
10}:
11
12buildPythonPackage rec {
13 pname = "hug";
14 version = "2.6.0";
15 disabled = isPy27;
16
17 src = fetchFromGitHub {
18 owner = "hugapi";
19 repo = pname;
20 rev = version;
21 sha256 = "05rsv16g7ph100p8kl4l2jba0y4wcpp3xblc02mfp67zp1279vaq";
22 };
23
24 nativeBuildInputs = [ pytestrunner ];
25 propagatedBuildInputs = [ falcon requests ];
26
27 checkInputs = [ mock marshmallow pytest numpy ];
28 checkPhase = ''
29 mv hug hug.hidden
30 # some tests attempt network access
31 PATH=$out/bin:$PATH pytest -k "not (test_request or test_datagram_request)"
32 '';
33
34 meta = with lib; {
35 description = "A Python framework that makes developing APIs as simple as possible, but no simpler";
36 homepage = https://github.com/timothycrosley/hug;
37 license = licenses.mit;
38 broken = isPy38;
39 };
40
41}