11 buildPythonPackage rec {
12 pname = "contexttimer";
13 version = "unstable-2019-03-30";
14 format = "setuptools";
16 disabled = pythonAtLeast "3.12";
18 src = fetchFromGitHub {
20 repo = "contexttimer";
21 rev = "a866f420ed4c10f29abf252c58b11f9db6706100";
22 hash = "sha256-Fc1vK1KSZWgBPtBf5dVydF6dLHEGAOslWMV0FLRdj8w=";
26 # https://github.com/brouberol/contexttimer/pull/16
28 url = "https://github.com/brouberol/contexttimer/commit/dd65871f3f25a523a47a74f2f5306c57048592b0.patch";
29 hash = "sha256-vNBuFXvuvb6hWPzg4W4iyKbd4N+vofhxsKydEkc25E4=";
33 pythonImportsCheck = [ "contexttimer" ];
35 nativeCheckInputs = [ mock ];
38 ${python.interpreter} -m unittest tests/test_timer.py
42 homepage = "https://github.com/brouberol/contexttimer";
43 description = "Timer as a context manager";
44 license = licenses.gpl3Only;
45 maintainers = with maintainers; [ atila ];