metis: 5.1.0 -> 5.2.1

Co-authored-by: Luna <git@lunnova.dev>
This commit is contained in:
natsukium
2025-09-18 14:26:41 -07:00
committed by Luna Nova
co-authored by Luna
parent 47fec8041d
commit c24010370f
+31 -16
View File
@@ -1,34 +1,49 @@
{
lib,
stdenv,
fetchurl,
unzip,
fetchFromGitHub,
fetchpatch,
cmake,
gklib,
llvmPackages,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "metis";
version = "5.1.0";
version = "5.2.1";
src = fetchurl {
url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-${version}.tar.gz";
sha256 = "1cjxgh41r8k6j029yxs8msp3z6lcnpm16g5pvckk35kc7zhfpykn";
src = fetchFromGitHub {
owner = "KarypisLab";
repo = "METIS";
tag = "v${finalAttrs.version}";
hash = "sha256-eddLR6DvZ+2LeR0DkknN6zzRvnW+hLN2qeI+ETUPcac=";
};
cmakeFlags = [
"-DGKLIB_PATH=../GKlib"
# remove once updated past https://github.com/KarypisLab/METIS/commit/521a2c360dc21ace5c4feb6dc0b7992433e3cb0f
"-DCMAKE_SKIP_BUILD_RPATH=ON"
patches = [
# fix gklib link error
(fetchpatch {
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/sci-libs/metis/files/metis-5.2.1-add-gklib-as-required.patch?id=c78ecbd3fdf9b33e307023baf0de12c4448dd283";
hash = "sha256-uoXMi6pMs5VrzUmjsLlQYFLob1A8NAt9CbFi8qhQXVQ=";
})
];
nativeBuildInputs = [
unzip
cmake
nativeBuildInputs = [ cmake ];
buildInputs = [ gklib ] ++ lib.optional stdenv.cc.isClang llvmPackages.openmp;
preConfigure = ''
make config
'';
cmakeFlags = [
(lib.cmakeBool "OPENMP" true)
(lib.cmakeBool "SHARED" (!stdenv.hostPlatform.isStatic))
];
meta = {
description = "Serial graph partitioning and fill-reducing matrix ordering";
homepage = "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview";
homepage = "https://github.com/KarypisLab/METIS";
license = lib.licenses.asl20;
platforms = lib.platforms.all;
};
}
})