Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
89 lines
1.9 KiB
Nix
89 lines
1.9 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
autoreconfHook,
|
|
pkg-config,
|
|
metis,
|
|
p4est-sc,
|
|
mpi,
|
|
mpiCheckPhaseHook,
|
|
debug ? false,
|
|
withMetis ? true,
|
|
mpiSupport ? true,
|
|
|
|
# passthru.tests
|
|
testers,
|
|
}:
|
|
let
|
|
p4est-sc' = p4est-sc.override { inherit mpi mpiSupport debug; };
|
|
in
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "p4est";
|
|
version = "2.8.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cburstedde";
|
|
repo = "p4est";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-8JvKaYOP4IO1Xmim74KNHvMLOV3y9VRoT76RBCaRyhI=";
|
|
};
|
|
|
|
strictDeps = true;
|
|
|
|
postPatch = ''
|
|
echo $version > .tarball-version
|
|
|
|
substituteInPlace Makefile.am \
|
|
--replace-fail "@P4EST_SC_AMFLAGS@" "-I ${p4est-sc}/share/aclocal"
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
autoreconfHook
|
|
pkg-config
|
|
]
|
|
++ lib.optional mpiSupport mpi;
|
|
|
|
buildInputs = [
|
|
metis
|
|
];
|
|
|
|
propagatedBuildInputs = [ p4est-sc' ];
|
|
|
|
configureFlags = [
|
|
"--with-sc=${p4est-sc'}"
|
|
"--with-metis"
|
|
"--enable-p6est"
|
|
"LDFLAGS=-lm"
|
|
]
|
|
++ lib.optionals mpiSupport [
|
|
"--enable-mpi"
|
|
"CC=mpicc"
|
|
]
|
|
++ lib.optional debug "--enable-debug";
|
|
|
|
doCheck = true;
|
|
|
|
__darwinAllowLocalNetworking = mpiSupport;
|
|
|
|
nativeCheckInputs = lib.optionals mpiSupport [
|
|
mpiCheckPhaseHook
|
|
];
|
|
|
|
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
|
|
|
meta = {
|
|
description = "Parallel AMR on Forests of Octrees";
|
|
longDescription = ''
|
|
The p4est software library provides algorithms for parallel AMR.
|
|
AMR refers to Adaptive Mesh Refinement, a technique in scientific
|
|
computing to cover the domain of a simulation with an adaptive mesh.
|
|
'';
|
|
homepage = "https://www.p4est.org/";
|
|
downloadPage = "https://github.com/cburstedde/p4est.git";
|
|
pkgConfigModules = [ "p4est" ];
|
|
license = lib.licenses.gpl2Plus;
|
|
maintainers = with lib.maintainers; [ qbisi ];
|
|
};
|
|
})
|