From 0f8d273ca5ff7b3c4a1cc2a3effe2f53c472f8a1 Mon Sep 17 00:00:00 2001 From: qbisi Date: Thu, 24 Oct 2024 10:46:05 +0800 Subject: [PATCH] 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. --- pkgs/by-name/ca/casadi/package.nix | 14 +++++++++----- pkgs/by-name/mu/mumps/package.nix | 1 - 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/ca/casadi/package.nix b/pkgs/by-name/ca/casadi/package.nix index 5cd35b064342..891b423d9e7a 100644 --- a/pkgs/by-name/ca/casadi/package.nix +++ b/pkgs/by-name/ca/casadi/package.nix @@ -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 search_paths;" \ diff --git a/pkgs/by-name/mu/mumps/package.nix b/pkgs/by-name/mu/mumps/package.nix index 0b078b97d281..7c70fef7ad79 100644 --- a/pkgs/by-name/mu/mumps/package.nix +++ b/pkgs/by-name/mu/mumps/package.nix @@ -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 '';