27 buildPythonPackage rec {
32 src = fetchFromGitHub {
35 rev = "refs/tags/${version}";
36 hash = "sha256-v0kp8dklvDeC7zdTDOpIbpuj13aGub+oCaYz2ytkEpI=";
40 substituteInPlace rust/Cargo.lock \
41 --replace "3.0.0-beta-1" "3.0.0"
45 cargoDeps = rustPlatform.fetchCargoTarball {
47 sourceRoot = "${src.name}/rust";
48 name = "${pname}-${version}";
49 hash = "sha256-6fw0KgnPIMfdseWcunsGjvjVB+lJNoG3pLDqkORPJ0I=";
51 substituteInPlace Cargo.lock \
52 --replace "3.0.0-beta-1" "3.0.0"
58 rustPlatform.maturinBuildHook
59 rustPlatform.cargoSetupHook
62 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ iconv ];
64 propagatedBuildInputs =
69 ++ lib.optional (!isPyPy) [ time-machine ]
70 ++ lib.optionals (pythonOlder "3.9") [
74 pythonImportsCheck = [ "pendulum" ];
82 [ "tests/benchmarks" ]
83 ++ lib.optionals stdenv.hostPlatform.isDarwin [
84 # PermissionError: [Errno 1] Operation not permitted: '/etc/localtime'
85 "tests/testing/test_time_travel.py"
89 description = "Python datetimes made easy";
90 homepage = "https://github.com/sdispater/pendulum";
91 changelog = "https://github.com/sdispater/pendulum/blob/${src.rev}/CHANGELOG.md";
92 license = licenses.mit;