Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b6a1d4f0cca7
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 52a24dcf7830
Choose a head ref
  • 3 commits
  • 1 file changed
  • 2 contributors

Commits on Jan 17, 2021

  1. Verified

    This commit was signed with the committer’s verified signature.
    holymonson Monson Shao
    Copy the full SHA
    70b54ac View commit details
  2. Copy the full SHA
    8efbb27 View commit details
  3. Copy the full SHA
    52a24dc View commit details
Showing with 22 additions and 9 deletions.
  1. +22 −9 pkgs/development/python-modules/hug/default.nix
31 changes: 22 additions & 9 deletions pkgs/development/python-modules/hug/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{ lib , buildPythonPackage, fetchFromGitHub, isPy27
, falcon
, pytestrunner
, requests
, pytest
, pytestCheckHook
, marshmallow
, mock
, numpy
@@ -20,19 +19,33 @@ buildPythonPackage rec {
sha256 = "05rsv16g7ph100p8kl4l2jba0y4wcpp3xblc02mfp67zp1279vaq";
};

nativeBuildInputs = [ pytestrunner ];
propagatedBuildInputs = [ falcon requests ];

checkInputs = [ mock marshmallow pytest numpy ];
checkPhase = ''
mv hug hug.hidden
# some tests attempt network access
PATH=$out/bin:$PATH pytest -k "not (test_request or test_datagram_request)"
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
'';

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"
];

meta = with lib; {
description = "A Python framework that makes developing APIs as simple as possible, but no simpler";
homepage = "https://github.com/timothycrosley/hug";
homepage = "https://github.com/hugapi/hug";
license = licenses.mit;
};