Skip to content

Commit e5a3734

Browse files
authored
pflotran: fix parmetis support (#388707)
1 parent 2531064 commit e5a3734

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

pkgs/by-name/pf/pflotran/package.nix

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,25 @@
1414
python3,
1515
}:
1616

17+
let
18+
/*
19+
Upstream petsc has lots of fortran api change since 3.22.0
20+
We will keep using older version until pflotran supports the latest petsc.
21+
Pflotran also requires Parmetis support in Petsc to have actual parmetis support.
22+
*/
23+
petsc' =
24+
(petsc.overrideAttrs rec {
25+
version = "3.21.4";
26+
src = fetchzip {
27+
url = "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-${version}.tar.gz";
28+
hash = "sha256-l7v+ASBL9FLbBmBGTRWDwBihjwLe3uLz+GwXtn8u7e0=";
29+
};
30+
}).override
31+
{
32+
withMetis = true;
33+
withParmetis = true;
34+
};
35+
in
1736
stdenv.mkDerivation (finalAttrs: {
1837
pname = "PFLOTRAN";
1938
version = "6.0.1";
@@ -30,15 +49,7 @@ stdenv.mkDerivation (finalAttrs: {
3049
nativeBuildInputs = [ gfortran ];
3150

3251
buildInputs = [
33-
# upstream petsc has lots of fortran api change since 3.22.*
34-
# will keep using old petsc-3.21.4 until pflotran support latest petsc
35-
(petsc.overrideAttrs rec {
36-
version = "3.21.4";
37-
src = fetchzip {
38-
url = "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-${version}.tar.gz";
39-
hash = "sha256-l7v+ASBL9FLbBmBGTRWDwBihjwLe3uLz+GwXtn8u7e0=";
40-
};
41-
})
52+
petsc'
4253
blas
4354
lapack
4455
hdf5-fortran-mpi

0 commit comments

Comments
 (0)