about summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
authormarkuskowa <markus.kowalewski@gmail.com>2021-07-12 11:46:44 +0200
committerGitHub <noreply@github.com>2021-07-12 11:46:44 +0200
commit13b3e91794b9c3ef258122d946524eb57e3d13fd (patch)
treed9d651b0afcdd67a90d0ff5ca804d8a195d7c45c /pkgs/applications/science
parenta164e1d0a17549cc4c238cfe9c32a0bac97b24e1 (diff)
parentcf4b4bdbeafdae01ba309b0fc3cbba7aa3df1593 (diff)
Merge pull request #128856 from cburstedde/package-petsc-p4est
petsc: refactor using mpi and p4est
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/math/getdp/default.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/applications/science/math/getdp/default.nix b/pkgs/applications/science/math/getdp/default.nix
index 39d9c866caef8..5ea3550d08a44 100644
--- a/pkgs/applications/science/math/getdp/default.nix
+++ b/pkgs/applications/science/math/getdp/default.nix
@@ -1,15 +1,19 @@
 { lib, stdenv, fetchurl, cmake, gfortran, blas, lapack, mpi, petsc, python3 }:
 
 stdenv.mkDerivation rec {
-  name = "getdp-${version}";
+  pname = "getdp";
   version = "3.3.0";
   src = fetchurl {
     url = "http://getdp.info/src/getdp-${version}-source.tgz";
     sha256 = "1pfviy2bw8z5y6c15czvlvyjjg9pvpgrj9fr54xfi2gmvs7zkgpf";
   };
 
-  nativeBuildInputs = [ cmake gfortran ];
-  buildInputs = [ blas lapack mpi petsc python3 ];
+  inherit (petsc) mpiSupport;
+  nativeBuildInputs = [ cmake python3 ];
+  buildInputs = [ gfortran blas lapack petsc ]
+    ++ lib.optional mpiSupport mpi
+  ;
+  cmakeFlags = lib.optional mpiSupport "-DENABLE_MPI=1";
 
   meta = with lib; {
     description = "A General Environment for the Treatment of Discrete Problems";