diff options
Diffstat (limited to 'pkgs/by-name/ca/casadi/package.nix')
-rw-r--r-- | pkgs/by-name/ca/casadi/package.nix | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/pkgs/by-name/ca/casadi/package.nix b/pkgs/by-name/ca/casadi/package.nix index dda1eed048d0..37bd4b1f567e 100644 --- a/pkgs/by-name/ca/casadi/package.nix +++ b/pkgs/by-name/ca/casadi/package.nix @@ -37,44 +37,34 @@ stdenv.mkDerivation (finalAttrs: { pname = "casadi"; - version = "3.6.6"; + version = "3.6.7"; src = fetchFromGitHub { owner = "casadi"; repo = "casadi"; rev = finalAttrs.version; - hash = "sha256-T4aaBS918NbUEwWkSx0URi0W9uhCB8IFmzRcOR7T8Og="; + hash = "sha256-Mft0qhjdAbU82RgjYuKue5p7EqbTbt3ii5yXSsCFHrQ="; }; patches = [ (fetchpatch { - name = "add-FindSPRAL.cmake.patch"; - url = "https://github.com/casadi/casadi/pull/3792/commits/28bc1b03e67ae06dea0c8557057020f5651be7ad.patch"; - hash = "sha256-t0+RnXoFakmoX93MhN08RWAbCg6Nerh42LicBBgAkRQ="; + name = "fix-FindMUMPS.cmake.patch"; + url = "https://github.com/casadi/casadi/pull/3899/commits/274f4b23f73e60c5302bec0479fe1e92682b63d2.patch"; + hash = "sha256-3GWEWlN8dKLD6htpnOQLChldcT3hE09JWLeuCfAhY+4="; }) ]; postPatch = '' - # fix case of fatropConfig.cmake & hpipmConfig.cmake + # fix case of hpipmConfig.cmake substituteInPlace CMakeLists.txt --replace-fail \ "FATROP HPIPM" \ - "fatrop hpipm" + "FATROP hpipm" # nix provide lib/clang headers in libclang, not in llvm. substituteInPlace casadi/interfaces/clang/CMakeLists.txt --replace-fail \ '$'{CLANG_LLVM_LIB_DIR} \ - ${llvmPackages_17.libclang.lib}/lib - - # fix fatrop includes - substituteInPlace casadi/interfaces/fatrop/fatrop_conic_interface.hpp --replace-fail \ - "<ocp/" \ - "<fatrop/ocp/" - - # fix mumps lib name. No idea where this comes from. - substituteInPlace cmake/FindMUMPS.cmake --replace-fail \ - "mumps_seq" \ - "mumps" + ${lib.getLib llvmPackages_17.libclang}/lib # help casadi find its own libs substituteInPlace casadi/core/casadi_os.cpp --replace-fail \ @@ -97,7 +87,7 @@ stdenv.mkDerivation (finalAttrs: { "if (SWIG_IMPORT)" \ "if (NOT SWIG_IMPORT)" '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.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" \ @@ -150,7 +140,7 @@ stdenv.mkDerivation (finalAttrs: { python3Packages.numpy python3Packages.python ] - ++ lib.optionals stdenv.isDarwin [ llvmPackages_17.openmp ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages_17.openmp ]; cmakeFlags = [ (lib.cmakeBool "WITH_PYTHON" pythonSupport) @@ -173,7 +163,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "WITH_CSPARSE" true) (lib.cmakeBool "WITH_BLASFEO" true) (lib.cmakeBool "WITH_HPIPM" true) - (lib.cmakeBool "WITH_FATROP" false) # invalid new-expression of abstract class type 'casadi::CasadiStructuredQP' + (lib.cmakeBool "WITH_FATROP" true) (lib.cmakeBool "WITH_BUILD_FATROP" false) (lib.cmakeBool "WITH_SUPERSCS" false) # packaging too chaotic (lib.cmakeBool "WITH_BUILD_OSQP" false) |