1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch,
6 freezegun,
7 pytest,
8 pytestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "pytest-freezegun";
13 version = "0.4.2";
14 format = "setuptools";
15
16 src = fetchFromGitHub {
17 owner = "ktosiek";
18 repo = "pytest-freezegun";
19 rev = version;
20 sha256 = "10c4pbh03b4s1q8cjd75lr0fvyf9id0zmdk29566qqsmaz28npas";
21 };
22
23 patches = [
24 (fetchpatch {
25 # https://github.com/ktosiek/pytest-freezegun/pull/38
26 name = "pytest-freezegun-drop-distutils.patch";
27 url = "https://github.com/ktosiek/pytest-freezegun/commit/03d7107a877e8f07617f931a379f567d89060085.patch";
28 hash = "sha256-/7GTQdidVbE2LT5hwxjEc2dr+aWr6TX1131U4KMQhns=";
29 })
30 ];
31
32 buildInputs = [ pytest ];
33
34 propagatedBuildInputs = [ freezegun ];
35
36 nativeCheckInputs = [ pytestCheckHook ];
37
38 meta = with lib; {
39 description = "Wrap tests with fixtures in freeze_time";
40 homepage = "https://github.com/ktosiek/pytest-freezegun";
41 license = licenses.mit;
42 maintainers = [ maintainers.mic92 ];
43 };
44}