diff --git a/pkgs/development/python-modules/pook/default.nix b/pkgs/development/python-modules/pook/default.nix new file mode 100644 index 000000000000..480dc7dcba64 --- /dev/null +++ b/pkgs/development/python-modules/pook/default.nix @@ -0,0 +1,57 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, fetchpatch +, furl +, jsonschema +, nose +, pytestCheckHook +, pythonOlder +, requests +, xmltodict +}: + +buildPythonPackage rec { + pname = "pook"; + version = "1.0.1"; + disabled = pythonOlder "3.5"; + + src = fetchFromGitHub { + owner = "h2non"; + repo = pname; + rev = "v${version}"; + sha256 = "0z48vswj07kr2sdvq5qzrwqyijpmj2rlnh2z2b32id1mckr6nnz8"; + }; + + patches = [ + (fetchpatch { + # Will be fixed with the new release, https://github.com/h2non/pook/issues/69 + name = "use-match-keyword-in-pytest.patch"; + url = "https://github.com/h2non/pook/commit/2071da27701c82ce02b015e01e2aa6fd203e7bb5.patch"; + sha256 = "0i3qcpbdqqsnbygi46dyqamgkh9v8rhpbm4lkl75riw48j4n080k"; + }) + ]; + + propagatedBuildInputs = [ + aiohttp + furl + jsonschema + requests + xmltodict + ]; + + checkInputs = [ + nose + pytestCheckHook + ]; + + pythonImportsCheck = [ "pook" ]; + + meta = with lib; { + description = "HTTP traffic mocking and testing made simple in Python"; + homepage = "https://github.com/h2non/pook"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f2b8afa2c56b..c933b99d7fd5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5095,6 +5095,8 @@ in { pooch = callPackage ../development/python-modules/pooch { }; + pook = callPackage ../development/python-modules/pook { }; + poolsense = callPackage ../development/python-modules/poolsense { }; poppler-qt5 = callPackage ../development/python-modules/poppler-qt5 {