diff --git a/pkgs/development/python-modules/pendulum/3.nix b/pkgs/development/python-modules/pendulum/3.nix index 1f59b1a10639..78e9c675ea8d 100644 --- a/pkgs/development/python-modules/pendulum/3.nix +++ b/pkgs/development/python-modules/pendulum/3.nix @@ -1,4 +1,5 @@ { lib +, stdenv , buildPythonPackage , fetchFromGitHub , pythonOlder @@ -8,6 +9,9 @@ , poetry-core , rustPlatform +# native dependencies +, iconv + # dependencies , backports-zoneinfo , importlib-resources @@ -22,22 +26,31 @@ buildPythonPackage rec { pname = "pendulum"; - version = "3.0.0b1"; + version = "3.0.0"; pyproject = true; src = fetchFromGitHub { owner = "sdispater"; repo = "pendulum"; rev = "refs/tags/${version}"; - hash = "sha256-11W22RpoYUcL9Nya32HRX4Jdo4L9XP2Zftevc+7eFzw="; + hash = "sha256-v0kp8dklvDeC7zdTDOpIbpuj13aGub+oCaYz2ytkEpI="; }; + postPatch = '' + substituteInPlace rust/Cargo.lock \ + --replace "3.0.0-beta-1" "3.0.0" + ''; + cargoRoot = "rust"; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; sourceRoot = "source/rust"; name = "${pname}-${version}"; - hash = "sha256-qyyPR4a+IHrRSZzOZaW+DXGpOTyFcEVu/+Mt5QlQFqw="; + hash = "sha256-6fw0KgnPIMfdseWcunsGjvjVB+lJNoG3pLDqkORPJ0I="; + postPatch = '' + substituteInPlace Cargo.lock \ + --replace "3.0.0-beta-1" "3.0.0" + ''; }; nativeBuildInputs = [ @@ -46,6 +59,10 @@ buildPythonPackage rec { rustPlatform.cargoSetupHook ]; + buildInputs = lib.optionals stdenv.isDarwin [ + iconv + ]; + propagatedBuildInputs = [ python-dateutil tzdata @@ -67,6 +84,9 @@ buildPythonPackage rec { disabledTestPaths = [ "tests/benchmarks" + ] ++ lib.optionals stdenv.isDarwin [ + # PermissionError: [Errno 1] Operation not permitted: '/etc/localtime' + "tests/testing/test_time_travel.py" ]; meta = with lib; { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 20975778a728..7c69cff6cc2d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9104,7 +9104,9 @@ self: super: with self; { pendulum = if pythonAtLeast "3.12" then callPackage ../development/python-modules/pendulum/3.nix { } else - callPackage ../development/python-modules/pendulum { }; + pendulum_3; + + pendulum_3 = callPackage ../development/python-modules/pendulum { }; pep440 = callPackage ../development/python-modules/pep440 { };