spicedb: 1.39.1 -> 1.40.0
[NixPkgs.git] / pkgs / development / python-modules / mock-services / default.nix
blob723ec6f78233143270ac7a59c81c38c088d49cea
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   fetchpatch,
6   attrs,
7   funcsigs,
8   requests-mock,
9   pytestCheckHook,
12 buildPythonPackage rec {
13   pname = "mock-services";
14   version = "0.3.1";
15   format = "setuptools";
17   src = fetchFromGitHub {
18     owner = "peopledoc";
19     repo = "mock-services";
20     rev = version;
21     sha256 = "1rqyyfwngi1xsd9a81irjxacinkj1zf6nqfvfxhi55ky34x5phf9";
22   };
24   patches = [
25     # Fix issues due to internal API breaking in latest versions of requests-mock
26     (fetchpatch {
27       url = "https://github.com/peopledoc/mock-services/commit/88d3a0c9ef4dd7d5e011068ed2fdbbecc4a1a03a.patch";
28       sha256 = "0a4pwxr33kr525sp8q4mb4cr3n2b51mj2a3052lhg6brdbi4gnms";
29     })
30   ];
32   propagatedBuildInputs = [
33     attrs
34     funcsigs
35     requests-mock
36   ];
38   nativeCheckInputs = [ pytestCheckHook ];
40   disabledTests = [
41     # require networking
42     "test_real_http_1"
43     "test_restart_http_mock"
44     "test_start_http_mock"
45     "test_stop_http_mock"
46   ];
48   pythonImportsCheck = [ "mock_services" ];
50   meta = with lib; {
51     description = "Mock an entire service API based on requests-mock";
52     homepage = "https://github.com/peopledoc/mock-services";
53     license = licenses.mit;
54     maintainers = with maintainers; [ dotlambda ];
55   };