From 682bae4d7365bb1909e34ac4d7529a5d481c890f Mon Sep 17 00:00:00 2001 From: Simon Hauser Date: Fri, 29 Nov 2024 10:32:44 +0100 Subject: [PATCH] feat: add scotch support to openfoam build --- precice-packages/openfoam/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/precice-packages/openfoam/default.nix b/precice-packages/openfoam/default.nix index 0b5dd0f..4c721da 100644 --- a/precice-packages/openfoam/default.nix +++ b/precice-packages/openfoam/default.nix @@ -11,6 +11,7 @@ writeScript, version, hash, + scotch, }: let @@ -65,6 +66,9 @@ let export LD_LIBRARY_PATH=$FOAM_LIBBIN:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$FOAM_LIBBIN/dummy:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/run/current-system/sw/lib/:$LD_LIBRARY_PATH + + export SCOTCH_VERSION=scotch_${scotch.version} + export SCOTCH_ARCH_PATH=${scotch} ''; in stdenv.mkDerivation rec { @@ -86,6 +90,7 @@ stdenv.mkDerivation rec { openmpi zlib flex + scotch ]; postPatch = '' @@ -96,6 +101,11 @@ stdenv.mkDerivation rec { ''; buildPhase = '' + cat < etc/config.sh/scotch + export SCOTCH_VERSION=scotch_${scotch.version} + export SCOTCH_ARCH_PATH=${scotch} + EOF + cp ${set-vars-script} bin/set-openfoam-vars source bin/set-openfoam-vars