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