mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
python{313,314}Packages.pendulum: fix the build on Darwin
This commit is contained in:
parent
d1fce43f43
commit
353395589e
2 changed files with 46 additions and 5 deletions
|
|
@ -7,9 +7,6 @@
|
|||
# build-system
|
||||
rustPlatform,
|
||||
|
||||
# native dependencies
|
||||
iconv,
|
||||
|
||||
# dependencies
|
||||
python-dateutil,
|
||||
tzdata,
|
||||
|
|
@ -31,6 +28,13 @@ buildPythonPackage (finalAttrs: {
|
|||
hash = "sha256-zpBymeYhCy+yu6RPhOuN5xOVk6928hd3+oRsfiBPPuY=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix the build on Darwin.
|
||||
#
|
||||
# <https://github.com/python-pendulum/pendulum/pull/979>
|
||||
./delete-obsolete-cargo-toml.patch
|
||||
];
|
||||
|
||||
cargoRoot = "rust";
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit (finalAttrs) pname version src;
|
||||
|
|
@ -43,8 +47,6 @@ buildPythonPackage (finalAttrs: {
|
|||
rustPlatform.cargoSetupHook
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ iconv ];
|
||||
|
||||
dependencies = [
|
||||
python-dateutil
|
||||
tzdata
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
From dd0c442ab1f50f19dde95875b39a6a4463e6e835 Mon Sep 17 00:00:00 2001
|
||||
From: Emily <hello@emily.moe>
|
||||
Date: Sat, 4 Jul 2026 18:18:19 +0100
|
||||
Subject: [PATCH] Delete obsolete `.cargo/config.toml`
|
||||
|
||||
Maturin adds these flags by itself, but the presence of this file can
|
||||
seemingly cause them to not get added at all in some environments,
|
||||
likely related to them using their own `.cargo/config.toml` file.
|
||||
|
||||
This was possibly caused by
|
||||
<https://github.com/PyO3/maturin/commit/74baa6714808eae61ac330c972d22a9122f9b190>,
|
||||
as we noticed it when bumping Maturin past that commit in
|
||||
Nixpkgs. Removing the file fixes the macOS build in our environment.
|
||||
---
|
||||
rust/.cargo/config.toml | 15 ---------------
|
||||
1 file changed, 15 deletions(-)
|
||||
delete mode 100644 rust/.cargo/config.toml
|
||||
|
||||
diff --git a/rust/.cargo/config.toml b/rust/.cargo/config.toml
|
||||
deleted file mode 100644
|
||||
index f0ba8af4..00000000
|
||||
--- a/rust/.cargo/config.toml
|
||||
+++ /dev/null
|
||||
@@ -1,15 +0,0 @@
|
||||
-[build]
|
||||
-rustflags = []
|
||||
-
|
||||
-# see https://pyo3.rs/main/building_and_distribution.html#macos
|
||||
-[target.x86_64-apple-darwin]
|
||||
-rustflags = [
|
||||
- "-C", "link-arg=-undefined",
|
||||
- "-C", "link-arg=dynamic_lookup",
|
||||
-]
|
||||
-
|
||||
-[target.aarch64-apple-darwin]
|
||||
-rustflags = [
|
||||
- "-C", "link-arg=-undefined",
|
||||
- "-C", "link-arg=dynamic_lookup",
|
||||
-]
|
||||
Loading…
Add table
Add a link
Reference in a new issue