mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-17 09:34:36 +00:00
python3Packages.numpy: fix cross compilation
Add mesonEmulatorHook, along with a small hack to make it function properly with meson-python.
This commit is contained in:
parent
4104fe93c0
commit
bad887d926
@ -11,6 +11,7 @@
|
||||
, cython_3
|
||||
, gfortran
|
||||
, meson-python
|
||||
, mesonEmulatorHook
|
||||
, pkg-config
|
||||
, xcbuild
|
||||
|
||||
@ -96,6 +97,8 @@ in buildPythonPackage rec {
|
||||
pkg-config
|
||||
] ++ lib.optionals (stdenv.isDarwin) [
|
||||
xcbuild.xcrun
|
||||
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
||||
mesonEmulatorHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@ -114,6 +117,11 @@ in buildPythonPackage rec {
|
||||
export OMP_NUM_THREADS=$((NIX_BUILD_CORES > 64 ? 64 : NIX_BUILD_CORES))
|
||||
'';
|
||||
|
||||
# HACK: copy mesonEmulatorHook's flags to the variable used by meson-python
|
||||
postConfigure = ''
|
||||
mesonFlags="$mesonFlags ''${mesonFlagsArray[@]}"
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
ln -s ${cfg} site.cfg
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user