casadi: always set PYTHON_PREFIX, using placeholder "out".

This commit is contained in:
Doron Behar 2024-08-13 20:58:02 +03:00
parent a3b45b9fe9
commit 098a7874e2

View File

@ -155,6 +155,9 @@ stdenv.mkDerivation (finalAttrs: {
cmakeFlags = [
(lib.cmakeBool "WITH_PYTHON" pythonSupport)
(lib.cmakeBool "WITH_PYTHON3" pythonSupport)
# We don't mind always setting this cmake variable, it will be read only if
# pythonSupport is enabled.
"-DPYTHON_PREFIX=${placeholder "out"}/${python3Packages.python.sitePackages}"
(lib.cmakeBool "WITH_JSON" false)
(lib.cmakeBool "WITH_INSTALL_INTERNAL_HEADERS" true)
(lib.cmakeBool "INSTALL_INTERNAL_HEADERS" true)
@ -201,11 +204,6 @@ stdenv.mkDerivation (finalAttrs: {
#(lib.cmakeBool "WITH_ALPAQA" true) # this requires casadi...
];
# I don't know how to pass absolute $out path from cmakeFlags
postConfigure = lib.optionalString pythonSupport ''
cmake -DPYTHON_PREFIX=$out/${python3Packages.python.sitePackages} ..
'';
doCheck = true;
meta = {