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

Changed files
+20 -10
pkgs
by-name
mu
mumps
sc
scotch
+8 -10
pkgs/by-name/mu/mumps/package.nix
···
++ lib.optional mpiSupport mpi
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
-
# Parmetis should be placed before scotch to avoid conflict of header file "parmetis.h"
-
buildInputs =
-
lib.optional withParmetis parmetis
-
++ lib.optional mpiSupport scalapack
-
++ [
-
blas
-
lapack
-
metis
-
scotch'
-
];
+
buildInputs = [
+
blas
+
lapack
+
metis
+
scotch'
+
]
+
++ lib.optional mpiSupport scalapack
+
++ lib.optional withParmetis parmetis;
doInstallCheck = true;
+12
pkgs/by-name/sc/scotch/package.nix
···
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
(lib.cmakeBool "BUILD_PTSCOTCH" withPtScotch)
+
# Prefix Scotch version of MeTiS routines
+
(lib.cmakeBool "SCOTCH_METIS_PREFIX" true)
+
# building tests is broken with SCOTCH_METIS_PREFIX enabled in 7.0.9
+
(lib.cmakeBool "ENABLE_TESTS" false)
];
nativeBuildInputs = [
···
};
};
};
+
+
# SCOTCH provide compatibility with Metis/Parmetis interface.
+
# We install the metis compatible headers to subdirectory to
+
# avoid conflict with metis/parmetis.
+
postFixup = ''
+
mkdir -p $dev/include/scotch
+
mv $dev/include/{*metis,metisf}.h $dev/include/scotch
+
'';
meta = {
description = "Graph and mesh/hypergraph partitioning, graph clustering, and sparse matrix ordering";