From 7788dbb2e53677e9f4029960d909108b3dcc007a Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Fri, 2 Aug 2024 17:03:42 +0200 Subject: [PATCH] scotch: also install libesmumps for mumps while here, update packaging to CMake, and build on darwin --- pkgs/by-name/sc/scotch/package.nix | 39 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/pkgs/by-name/sc/scotch/package.nix b/pkgs/by-name/sc/scotch/package.nix index a76eb47c014f..8455b4d22648 100644 --- a/pkgs/by-name/sc/scotch/package.nix +++ b/pkgs/by-name/sc/scotch/package.nix @@ -1,24 +1,21 @@ { - lib, - stdenv, - fetchFromGitLab, bison, - mpi, + bzip2, + cmake, + fetchFromGitLab, flex, + gfortran, + lib, + mpi, + stdenv, zlib, + xz, }: stdenv.mkDerivation (finalAttrs: { pname = "scotch"; version = "7.0.4"; - buildInputs = [ - bison - mpi - flex - zlib - ]; - src = fetchFromGitLab { domain = "gitlab.inria.fr"; owner = "scotch"; @@ -27,14 +24,19 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-uaox4Q9pTF1r2BZjvnU2LE6XkZw3x9mGSKLdRVUobGU="; }; - preConfigure = '' - cd src - ln -s Make.inc/Makefile.inc.x86-64_pc_linux2 Makefile.inc - ''; + nativeBuildInputs = [ + cmake + gfortran + ]; - buildFlags = [ "scotch ptscotch" ]; - - installFlags = [ "prefix=\${out}" ]; + buildInputs = [ + bison + bzip2 + mpi + flex + xz + zlib + ]; meta = { description = "Graph and mesh/hypergraph partitioning, graph clustering, and sparse matrix ordering"; @@ -45,6 +47,5 @@ stdenv.mkDerivation (finalAttrs: { homepage = "http://www.labri.fr/perso/pelegrin/scotch"; license = lib.licenses.cecill-c; maintainers = [ lib.maintainers.bzizou ]; - platforms = lib.platforms.linux; }; })