mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-20 02:55:39 +00:00
casadi: build on darwin
This commit is contained in:
parent
0f74c47896
commit
ded2f9eca4
@ -96,6 +96,17 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
substituteInPlace swig/python/CMakeLists.txt --replace-fail \
|
substituteInPlace swig/python/CMakeLists.txt --replace-fail \
|
||||||
"if (SWIG_IMPORT)" \
|
"if (SWIG_IMPORT)" \
|
||||||
"if (NOT SWIG_IMPORT)"
|
"if (NOT SWIG_IMPORT)"
|
||||||
|
''
|
||||||
|
+ lib.optionalString stdenv.isDarwin ''
|
||||||
|
# this is only printing stuff, and is not defined on all CPU
|
||||||
|
substituteInPlace casadi/interfaces/hpipm/hpipm_runtime.hpp --replace-fail \
|
||||||
|
"d_print_exp_tran_mat" \
|
||||||
|
"//d_print_exp_tran_mat"
|
||||||
|
|
||||||
|
# fix missing symbols
|
||||||
|
substituteInPlace cmake/FindCLANG.cmake --replace-fail \
|
||||||
|
"clangBasic)" \
|
||||||
|
"clangBasic clangASTMatchers clangSupport)"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
@ -138,7 +149,8 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
++ lib.optionals pythonSupport [
|
++ lib.optionals pythonSupport [
|
||||||
python3Packages.numpy
|
python3Packages.numpy
|
||||||
python3Packages.python
|
python3Packages.python
|
||||||
];
|
]
|
||||||
|
++ lib.optionals stdenv.isDarwin [ llvmPackages_17.openmp ];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
(lib.cmakeBool "WITH_PYTHON" pythonSupport)
|
(lib.cmakeBool "WITH_PYTHON" pythonSupport)
|
||||||
|
Loading…
Reference in New Issue
Block a user