From 190975084db68798309507a0c2a9e611a51cbec3 Mon Sep 17 00:00:00 2001 From: qbisi Date: Fri, 26 Sep 2025 18:45:32 +0800 Subject: [PATCH] scotch: sort build inputs --- pkgs/by-name/sc/scotch/package.nix | 39 +++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/sc/scotch/package.nix b/pkgs/by-name/sc/scotch/package.nix index 2fd91f8ff215..2173f79902a4 100644 --- a/pkgs/by-name/sc/scotch/package.nix +++ b/pkgs/by-name/sc/scotch/package.nix @@ -1,15 +1,16 @@ { - bison, - bzip2, - cmake, - fetchFromGitLab, - flex, - gfortran, lib, - mpi, stdenv, - zlib, + fetchFromGitLab, + cmake, + gfortran, + bison, + flex, + bzip2, xz, + zlib, + mpi, + testers, }: stdenv.mkDerivation (finalAttrs: { @@ -30,22 +31,36 @@ stdenv.mkDerivation (finalAttrs: { "out" ]; - cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]; + cmakeFlags = [ + (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) + ]; nativeBuildInputs = [ cmake gfortran + bison + flex ]; buildInputs = [ - bison bzip2 - mpi - flex xz zlib ]; + propagatedBuildInputs = [ + mpi + ]; + + passthru = { + tests = { + cmake-config = testers.hasCmakeConfigModules { + moduleNames = [ "SCOTCH" ]; + package = finalAttrs.finalPackage; + }; + }; + }; + meta = { description = "Graph and mesh/hypergraph partitioning, graph clustering, and sparse matrix ordering"; longDescription = ''