From 9e77929f19641a8c2dae0adbfb5d67b20aaae44d Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Wed, 24 Aug 2022 23:30:03 +0200 Subject: [PATCH 1/2] boost: allow enablePython in cross compilation --- pkgs/development/libraries/boost/generic.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index b9bdec0cd077..013496a54d5a 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -28,8 +28,6 @@ # We must build at least one type of libraries assert enableShared || enableStatic; -# Python isn't supported when cross-compiling -assert enablePython -> stdenv.hostPlatform == stdenv.buildPlatform; assert enableNumpy -> enablePython; # Boost <1.69 can't be built on linux with clang >8, because pth was removed From 1725792452dc9c2e095acf426fbb6a9f1f741680 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Wed, 24 Aug 2022 23:31:45 +0200 Subject: [PATCH 2/2] python3Packages.pybind11: use python interpreter from pythonForBuild --- pkgs/development/python-modules/pybind11/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/pybind11/default.nix b/pkgs/development/python-modules/pybind11/default.nix index 8f01ddd49adf..327a44690da3 100644 --- a/pkgs/development/python-modules/pybind11/default.nix +++ b/pkgs/development/python-modules/pybind11/default.nix @@ -34,6 +34,7 @@ buildPythonPackage rec { "-DBoost_INCLUDE_DIR=${lib.getDev boost}/include" "-DEIGEN3_INCLUDE_DIR=${lib.getDev eigen}/include/eigen3" "-DBUILD_TESTING=on" + "-DPYTHON_EXECUTABLE:FILEPATH=${python.pythonForBuild.interpreter}" ] ++ lib.optionals (python.isPy3k && !stdenv.cc.isClang) [ "-DPYBIND11_CXX_STANDARD=-std=c++17" ];