Files
nixpkgs/pkgs/development/python-modules/mock-services/default.nix
Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
2025-04-08 02:57:25 -04:00

57 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
attrs,
funcsigs,
requests-mock,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "mock-services";
version = "0.3.1";
format = "setuptools";
src = fetchFromGitHub {
owner = "peopledoc";
repo = "mock-services";
rev = version;
sha256 = "1rqyyfwngi1xsd9a81irjxacinkj1zf6nqfvfxhi55ky34x5phf9";
};
patches = [
# Fix issues due to internal API breaking in latest versions of requests-mock
(fetchpatch {
url = "https://github.com/peopledoc/mock-services/commit/88d3a0c9ef4dd7d5e011068ed2fdbbecc4a1a03a.patch";
sha256 = "0a4pwxr33kr525sp8q4mb4cr3n2b51mj2a3052lhg6brdbi4gnms";
})
];
propagatedBuildInputs = [
attrs
funcsigs
requests-mock
];
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = [
# require networking
"test_real_http_1"
"test_restart_http_mock"
"test_start_http_mock"
"test_stop_http_mock"
];
pythonImportsCheck = [ "mock_services" ];
meta = with lib; {
description = "Mock an entire service API based on requests-mock";
homepage = "https://github.com/peopledoc/mock-services";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
}