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