Skip to content

Commit

Permalink
casadi: always set PYTHON_PREFIX, using placeholder "out".
Browse files Browse the repository at this point in the history
  • Loading branch information
doronbehar committed Aug 13, 2024
1 parent a3b45b9 commit 098a787
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pkgs/by-name/ca/casadi/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit 098a787

Please sign in to comment.