mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-05 17:56:46 +01:00
contexttimer: init at unstable-2019-03-30
This commit is contained in:
parent
319165e421
commit
13dc1f09ad
42
pkgs/development/python-modules/contexttimer/default.nix
Normal file
42
pkgs/development/python-modules/contexttimer/default.nix
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{ 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=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportCheck = [ "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 ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1867,6 +1867,8 @@ in {
|
||||||
|
|
||||||
contextvars = callPackage ../development/python-modules/contextvars { };
|
contextvars = callPackage ../development/python-modules/contextvars { };
|
||||||
|
|
||||||
|
contexttimer = callPackage ../development/python-modules/contexttimer { };
|
||||||
|
|
||||||
convertdate = callPackage ../development/python-modules/convertdate { };
|
convertdate = callPackage ../development/python-modules/convertdate { };
|
||||||
|
|
||||||
cookiecutter = callPackage ../development/python-modules/cookiecutter { };
|
cookiecutter = callPackage ../development/python-modules/cookiecutter { };
|
||||||
|
|
Loading…
Reference in a new issue