blob: ad6b92c00b6a448393f7ddb4dd22f2929cdab773 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
tzdata,
unittestCheckHook,
}:
buildPythonPackage rec {
pname = "pytz";
version = "2025.2";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-NguePbtJognCGtYYCcf7RTZD4EiziSTHZYE1RnRugcM=";
};
postPatch = ''
# Use our system-wide zoneinfo dir instead of the bundled one
rm -rf pytz/zoneinfo
ln -snvf ${tzdata}/share/zoneinfo pytz/zoneinfo
'';
build-system = [ setuptools ];
nativeCheckInputs = [ unittestCheckHook ];
unittestFlagsArray = [
"-s"
"pytz/tests"
];
pythonImportsCheck = [ "pytz" ];
meta = {
changelog = "https://launchpad.net/pytz/+announcements";
description = "World timezone definitions, modern and historical";
homepage = "https://pythonhosted.org/pytz";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
dotlambda
jherland
];
};
}
|