mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-14 14:16:35 +01:00
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
38 lines
956 B
Nix
38 lines
956 B
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
buildPythonPackage,
|
|
dateutils,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pytimeparse2";
|
|
version = "1.7.1";
|
|
format = "setuptools";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "onegreyonewhite";
|
|
repo = "pytimeparse2";
|
|
tag = version;
|
|
hash = "sha256-zWRbSohTvbVd3GcRRoxH/UReVGYHC0YmbNgbt8N0X48=";
|
|
};
|
|
|
|
propagatedBuildInputs = [ dateutils ];
|
|
|
|
# custom checks, see
|
|
# https://github.com/onegreyonewhite/pytimeparse2/blob/e00df7506b6925f2c6a5783e89e9f239d128271a/tox.ini#L36C20-L36C78
|
|
checkPhase = ''
|
|
runHook preCheck
|
|
python tests.py -vv --failfast
|
|
runHook postCheck
|
|
'';
|
|
|
|
pythonImportsCheck = [ "pytimeparse2" ];
|
|
|
|
meta = {
|
|
description = "Pytimeparse based project with the aim of optimizing functionality and providing stable support";
|
|
homepage = "https://github.com/onegreyonewhite/pytimeparse2";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ gador ];
|
|
};
|
|
}
|