Commit 0f8d273c authored by qbisi's avatar qbisi
Browse files

mumps: headers remove symlink to subdir

With the upstream patch to casadi (https://github.com/casadi/casadi/pull/3899),
There is no need for nixpkgs#mumps to symlink header files to subdir mumps.
Nix packagers should manualy specify the include directory and link libraries for
the coinmumps required project like nipxkgs#libopt.
parent bf5d835e
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
  cplex,
  fatrop,
  fetchFromGitHub,
  fetchpatch,
  gurobi,
  highs,
  hpipm,
@@ -45,6 +46,14 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-Mft0qhjdAbU82RgjYuKue5p7EqbTbt3ii5yXSsCFHrQ=";
  };

  patches = [
    (fetchpatch {
      name = "fix-FindMUMPS.cmake.patch";
      url = "https://github.com/casadi/casadi/pull/3899/commits/274f4b23f73e60c5302bec0479fe1e92682b63d2.patch";
      hash = "sha256-3GWEWlN8dKLD6htpnOQLChldcT3hE09JWLeuCfAhY+4=";
    })
  ];

  postPatch =
    ''
      # fix case of hpipmConfig.cmake
@@ -57,11 +66,6 @@ stdenv.mkDerivation (finalAttrs: {
        '$'{CLANG_LLVM_LIB_DIR} \
        ${llvmPackages_17.libclang.lib}/lib

      # fix mumps lib name. No idea where this comes from.
      substituteInPlace cmake/FindMUMPS.cmake --replace-fail \
        "mumps_seq" \
        "mumps"

      # help casadi find its own libs
      substituteInPlace casadi/core/casadi_os.cpp --replace-fail \
        "std::vector<std::string> search_paths;" \
+0 −1
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ stdenv.mkDerivation (finalAttrs: {
    install -Dm 444 -t $out/include/mumps_seq libseq/*.h

    # Add some compatibility with coin-or-mumps
    ln -s $out/include $out/include/mumps
    ln -s $out/include/mumps_seq/mpi.h $out/include/mumps_mpi.h
  '';