lol

scotch: install *metis.h to subdirectory

SCOTCH has compatibility headers/libraries for the
MeTiS/ParMeTiS interface. However, the header files
"metis.h" and "parmetis.h" might cause conflict with
exsiting metis/parmetis packages. Hence move them to
subdirectory.

qbisi c1601a2a 0f237f6a

+20 -10
+8 -10
pkgs/by-name/mu/mumps/package.nix
··· 108 108 ++ lib.optional mpiSupport mpi 109 109 ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; 110 110 111 - # Parmetis should be placed before scotch to avoid conflict of header file "parmetis.h" 112 - buildInputs = 113 - lib.optional withParmetis parmetis 114 - ++ lib.optional mpiSupport scalapack 115 - ++ [ 116 - blas 117 - lapack 118 - metis 119 - scotch' 120 - ]; 111 + buildInputs = [ 112 + blas 113 + lapack 114 + metis 115 + scotch' 116 + ] 117 + ++ lib.optional mpiSupport scalapack 118 + ++ lib.optional withParmetis parmetis; 121 119 122 120 doInstallCheck = true; 123 121
+12
pkgs/by-name/sc/scotch/package.nix
··· 35 35 cmakeFlags = [ 36 36 (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) 37 37 (lib.cmakeBool "BUILD_PTSCOTCH" withPtScotch) 38 + # Prefix Scotch version of MeTiS routines 39 + (lib.cmakeBool "SCOTCH_METIS_PREFIX" true) 40 + # building tests is broken with SCOTCH_METIS_PREFIX enabled in 7.0.9 41 + (lib.cmakeBool "ENABLE_TESTS" false) 38 42 ]; 39 43 40 44 nativeBuildInputs = [ ··· 62 66 }; 63 67 }; 64 68 }; 69 + 70 + # SCOTCH provide compatibility with Metis/Parmetis interface. 71 + # We install the metis compatible headers to subdirectory to 72 + # avoid conflict with metis/parmetis. 73 + postFixup = '' 74 + mkdir -p $dev/include/scotch 75 + mv $dev/include/{*metis,metisf}.h $dev/include/scotch 76 + ''; 65 77 66 78 meta = { 67 79 description = "Graph and mesh/hypergraph partitioning, graph clustering, and sparse matrix ordering";