1{ lib 2, buildPythonPackage 3, fetchPypi 4, pythonOlder 5 6# build 7, poetry-core 8 9# runtime 10, backports-zoneinfo 11 12# tests 13, pytestCheckHook 14, freezegun 15}: 16 17buildPythonPackage rec { 18 pname = "astral"; 19 version = "3.2"; 20 format = "pyproject"; 21 22 disabled = pythonOlder "3.7"; 23 24 src = fetchPypi { 25 inherit pname version; 26 hash = "sha256-m3w7QS6eadFyz7JL4Oat3MnxvQGijbi+vmbXXMxTPYg="; 27 }; 28 29 nativeBuildInputs = [ 30 poetry-core 31 ]; 32 33 propagatedBuildInputs = lib.optionals (pythonOlder "3.9") [ 34 backports-zoneinfo 35 ]; 36 37 nativeCheckInputs = [ 38 freezegun 39 pytestCheckHook 40 ]; 41 42 meta = with lib; { 43 changelog = "https://github.com/sffjunkie/astral/releases/tag/${version}"; 44 description = "Calculations for the position of the sun and the moon"; 45 homepage = "https://github.com/sffjunkie/astral/"; 46 license = licenses.asl20; 47 maintainers = with maintainers; [ flokli ]; 48 }; 49}