libsupermesh: init at 2025.3.0 (#403098)

This commit is contained in:
Nick Cao
2025-05-10 09:48:03 -04:00
committed by GitHub
3 changed files with 127 additions and 0 deletions
+77
View File
@@ -0,0 +1,77 @@
{
lib,
stdenv,
fetchFromGitHub,
validatePkgConfig,
gfortran,
mpi,
cmake,
ninja,
libspatialindex,
mpiCheckPhaseHook,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libsupermesh";
version = "2025.3.0";
src = fetchFromGitHub {
owner = "firedrakeproject";
repo = "libsupermesh";
tag = "v${finalAttrs.version}";
hash = "sha256-RKBi89bUhkbRATaSB8629D+/NeYE3YNDIMEGzSK8z04=";
};
strictDeps = true;
outputs = [
"out"
"dev"
];
nativeBuildInputs = [
mpi
gfortran
cmake
ninja
validatePkgConfig
];
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
];
buildInputs = [
libspatialindex
gfortran.cc.lib
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [ mpiCheckPhaseHook ];
# On aarch64-darwin platform, the test program segfault at the line
# https://github.com/firedrakeproject/libsupermesh/blob/09af7c9a3beefc715fbdc23e46fdc96da8169ff6/src/tests/test_parallel_p1_inner_product_2d.F90#L164
# in defining the lambda subroutine pack_data_b with variable field_b.
# This error is test source and compiler related and does not indicate broken functionality of libsupermesh.
doCheck = !(stdenv.hostPlatform.system == "aarch64-darwin");
passthru = {
tests = {
pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
};
};
meta = {
homepage = "https://github.com/firedrakeproject/libsupermesh";
description = "Parallel supermeshing library";
changelog = "https://github.com/firedrakeproject/libsupermesh/releases/tag/v${finalAttrs.version}";
license = lib.licenses.lgpl2Plus;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ qbisi ];
pkgConfigModules = [ "libsupermesh" ];
};
})
@@ -0,0 +1,48 @@
{
lib,
pkgs,
buildPythonPackage,
fetchFromGitHub,
scikit-build-core,
gfortran,
cmake,
ninja,
mpi,
libspatialindex,
rtree,
}:
buildPythonPackage rec {
inherit (pkgs.libsupermesh)
pname
version
src
meta
;
pyproject = true;
build-system = [
scikit-build-core
];
nativeBuildInputs = [
gfortran
cmake
ninja
mpi
];
dontUseCmakeConfigure = true;
buildInputs = [
libspatialindex
gfortran.cc.lib
];
dependencies = [
rtree
];
# Only build tests if not built by scikit-build-core
doCheck = false;
}
+2
View File
@@ -7950,6 +7950,8 @@ self: super: with self; {
libsoundtouch = callPackage ../development/python-modules/libsoundtouch { };
libsupermesh = callPackage ../development/python-modules/libsupermesh { };
libthumbor = callPackage ../development/python-modules/libthumbor { };
libtmux = callPackage ../development/python-modules/libtmux { };