Merge pull request #128863 from cburstedde/package-p4est-sc
This commit is contained in:
commit
2f62c2f53d
2 changed files with 10 additions and 8 deletions
|
@ -1,13 +1,14 @@
|
|||
{ lib, stdenv, fetchFromGitHub
|
||||
, autoreconfHook, pkg-config
|
||||
, p4est-sc-debugEnable ? true, p4est-sc-mpiSupport ? true
|
||||
, mpi, openmpi, openssh, zlib
|
||||
, mpi, openssh, zlib
|
||||
}:
|
||||
|
||||
let
|
||||
dbg = if debugEnable then "-dbg" else "";
|
||||
debugEnable = p4est-sc-debugEnable;
|
||||
mpiSupport = p4est-sc-mpiSupport;
|
||||
isOpenmpi = mpiSupport && mpi.pname == "openmpi";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "p4est-sc${dbg}";
|
||||
|
@ -24,7 +25,7 @@ stdenv.mkDerivation {
|
|||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
propagatedBuildInputs = [ zlib ]
|
||||
++ lib.optional mpiSupport mpi
|
||||
++ lib.optional (mpiSupport && mpi == openmpi) openssh
|
||||
++ lib.optional isOpenmpi openssh
|
||||
;
|
||||
inherit debugEnable mpiSupport;
|
||||
|
||||
|
@ -36,15 +37,17 @@ stdenv.mkDerivation {
|
|||
${if mpiSupport then "unset CC" else ""}
|
||||
'';
|
||||
|
||||
configureFlags = lib.optional debugEnable "--enable-debug"
|
||||
configureFlags = [ "--enable-pthread=-pthread" ]
|
||||
++ lib.optional debugEnable "--enable-debug"
|
||||
++ lib.optional mpiSupport "--enable-mpi"
|
||||
;
|
||||
|
||||
makeFlags = [ "V=0" ];
|
||||
checkFlags = lib.optional isOpenmpi "-j1";
|
||||
|
||||
dontDisableStatic = true;
|
||||
enableParallelBuilding = true;
|
||||
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
||||
doCheck = !stdenv.isAarch64 && stdenv.hostPlatform == stdenv.buildPlatform;
|
||||
|
||||
meta = {
|
||||
branch = "prev3-develop";
|
||||
|
|
|
@ -35,13 +35,12 @@ stdenv.mkDerivation {
|
|||
${if mpiSupport then "unset CC" else ""}
|
||||
'';
|
||||
|
||||
configureFlags = [ "--with-sc=${p4est-sc}" ]
|
||||
configureFlags = p4est-sc.configureFlags
|
||||
++ [ "--with-sc=${p4est-sc}" ]
|
||||
++ lib.optional withMetis "--with-metis"
|
||||
++ lib.optional debugEnable "--enable-debug"
|
||||
++ lib.optional mpiSupport "--enable-mpi"
|
||||
;
|
||||
|
||||
inherit (p4est-sc) makeFlags dontDisableStatic enableParallelBuilding doCheck;
|
||||
inherit (p4est-sc) makeFlags checkFlags dontDisableStatic enableParallelBuilding doCheck;
|
||||
|
||||
meta = {
|
||||
branch = "prev3-develop";
|
||||
|
|
Loading…
Reference in a new issue