My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/python-modules/contexttimer/default.nix

42 lines
1021 B

{ lib
, buildPythonPackage
, fetchFromGitHub
, mock
, fetchpatch
, python
}:
buildPythonPackage rec {
pname = "contexttimer";
version = "unstable-2019-03-30";
src = fetchFromGitHub {
owner = "brouberol";
repo = "contexttimer";
rev = "a866f420ed4c10f29abf252c58b11f9db6706100";
sha256 = "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" ];
checkInputs = [ mock ];
checkPhase = ''
${python.interpreter} -m unittest tests/test_timer.py
'';
meta = with lib; {
homepage = "https://github.com/brouberol/contexttimer";
description = "A timer as a context manager";
license = licenses.gpl3Only;
maintainers = with maintainers; [ atila ];
};
}