diff --git a/pkgs/by-name/ca/casadi/clang-19.diff b/pkgs/by-name/ca/casadi/clang-19.diff deleted file mode 100644 index e7706cb320ba..000000000000 --- a/pkgs/by-name/ca/casadi/clang-19.diff +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/casadi/interfaces/clang/clang_compiler.hpp b/casadi/interfaces/clang/clang_compiler.hpp -index 7f54853..9f8d4b1 100644 ---- a/casadi/interfaces/clang/clang_compiler.hpp -+++ b/casadi/interfaces/clang/clang_compiler.hpp -@@ -52,7 +52,7 @@ - #include "llvm/IR/LLVMContext.h" - //#include "llvm/IR/Verifier.h" - #include --#include -+#include - #include - #include - #include -diff --git a/cmake/FindCLANG.cmake b/cmake/FindCLANG.cmake -index 4edf60b..f23a348 100644 ---- a/cmake/FindCLANG.cmake -+++ b/cmake/FindCLANG.cmake -@@ -16,7 +16,7 @@ set(CLANG_CXX_FLAGS "-fPIC -fvisibility-inlines-hidden -ffunction-sections -fdat - set(CLANG_INCLUDE_DIR ${LLVM_INSTALL_PREFIX}/include) - - # All clang libraries --set(CLANG_DEP clangFrontend clangDriver clangCodeGen clangRewriteFrontend clangSerialization clangParse clangSema clangAnalysis clangEdit clangAST clangLex clangBasic ${LLVM_DEP}) -+set(CLANG_DEP clangFrontend clangDriver clangCodeGen clangRewriteFrontend clangSerialization clangParse clangSema clangAPINotes clangAnalysis clangEdit clangAST clangLex clangBasic ${LLVM_DEP}) - - # Get libraries - set(CLANG_LIBRARIES) -@@ -86,7 +86,7 @@ set(CLANG_INCLUDE_DIR ${CLANG_LLVM_INCLUDE_DIR}) - - # All clang libraries - set(CLANG_DEP clangFrontend clangDriver clangCodeGen clangRewriteFrontend clangSerialization -- clangParse clangSema clangAnalysis clangEdit clangAST clangLex clangBasic) -+ clangParse clangSema clangAPINotes clangAnalysis clangEdit clangAST clangLex clangBasic) - - # Get libraries - foreach(D ${CLANG_DEP}) diff --git a/pkgs/by-name/ca/casadi/package.nix b/pkgs/by-name/ca/casadi/package.nix index c2a247525efc..fbaf8cf27e3c 100644 --- a/pkgs/by-name/ca/casadi/package.nix +++ b/pkgs/by-name/ca/casadi/package.nix @@ -48,10 +48,6 @@ stdenv.mkDerivation (finalAttrs: { }; patches = [ - # update include file path and link with clangAPINotes - # https://github.com/casadi/casadi/issues/3969 - ./clang-19.diff - # Add missing include # ref. https://github.com/casadi/casadi/pull/4192 (fetchpatch { @@ -77,11 +73,6 @@ stdenv.mkDerivation (finalAttrs: { "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} \ - ${lib.getLib llvmPackages.libclang}/lib - # help casadi find its own libs substituteInPlace casadi/core/casadi_os.cpp --replace-fail \ "std::vector search_paths;" \ @@ -108,11 +99,6 @@ stdenv.mkDerivation (finalAttrs: { 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 = [ @@ -189,7 +175,9 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "WITH_TINYXML" true) (lib.cmakeBool "WITH_BUILD_DSDP" true) # not sure where this come from (lib.cmakeBool "WITH_DSDP" true) - (lib.cmakeBool "WITH_CLANG" true) + # "clang_compiler.cpp has basically been abandonded for several years", ref. + # https://github.com/casadi/casadi/issues/4225#issuecomment-3352552113 + (lib.cmakeBool "WITH_CLANG" false) (lib.cmakeBool "WITH_LAPACK" true) (lib.cmakeBool "WITH_QPOASES" true) (lib.cmakeBool "WITH_BLOCKSQP" true)