nixpkgs/pkgs/development/python-modules/contexttimer/default.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

48 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
pythonAtLeast,
fetchFromGitHub,
mock,
fetchpatch,
python,
}:
buildPythonPackage rec {
pname = "contexttimer";
version = "unstable-2019-03-30";
format = "setuptools";
disabled = pythonAtLeast "3.12";
src = fetchFromGitHub {
owner = "brouberol";
repo = "contexttimer";
rev = "a866f420ed4c10f29abf252c58b11f9db6706100";
hash = "sha256-Fc1vK1KSZWgBPtBf5dVydF6dLHEGAOslWMV0FLRdj8w=";
};
patches = [
# https://github.com/brouberol/contexttimer/pull/16
(fetchpatch {
url = "https://github.com/brouberol/contexttimer/commit/dd65871f3f25a523a47a74f2f5306c57048592b0.patch";
hash = "sha256-vNBuFXvuvb6hWPzg4W4iyKbd4N+vofhxsKydEkc25E4=";
})
];
pythonImportsCheck = [ "contexttimer" ];
nativeCheckInputs = [ mock ];
checkPhase = ''
${python.interpreter} -m unittest tests/test_timer.py
'';
meta = with lib; {
homepage = "https://github.com/brouberol/contexttimer";
description = "Timer as a context manager";
license = licenses.gpl3Only;
maintainers = with maintainers; [ atila ];
};
}