nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 jaraco-functools,
6 pytest-freezer,
7 pytestCheckHook,
8 python-dateutil,
9 setuptools-scm,
10}:
11
12buildPythonPackage rec {
13 pname = "tempora";
14 version = "5.8.1";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "jaraco";
19 repo = "tempora";
20 tag = "v${version}";
21 hash = "sha256-1Zeo8bUCHKPZ6I0HGT7bIh7IgbRL4j9Cv3t9FFiZ72s=";
22 };
23
24 postPatch = ''
25 sed -i "/coherent\.licensed/d" pyproject.toml
26 '';
27
28 build-system = [ setuptools-scm ];
29
30 dependencies = [
31 jaraco-functools
32 python-dateutil
33 ];
34
35 nativeCheckInputs = [
36 pytest-freezer
37 pytestCheckHook
38 ];
39
40 pythonImportsCheck = [
41 "tempora"
42 "tempora.schedule"
43 "tempora.timing"
44 "tempora.utc"
45 ];
46
47 meta = {
48 description = "Objects and routines pertaining to date and time";
49 mainProgram = "calc-prorate";
50 homepage = "https://github.com/jaraco/tempora";
51 changelog = "https://github.com/jaraco/tempora/blob/${src.tag}/NEWS.rst";
52 license = lib.licenses.mit;
53 maintainers = [ ];
54 };
55}