Skip to content

Commit

Permalink
feat: add scotch support to openfoam build
Browse files Browse the repository at this point in the history
  • Loading branch information
Conni2461 committed Nov 29, 2024
1 parent fc45f8c commit 682bae4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions precice-packages/openfoam/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
writeScript,
version,
hash,
scotch,
}:

let
Expand Down Expand Up @@ -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 {
Expand All @@ -86,6 +90,7 @@ stdenv.mkDerivation rec {
openmpi
zlib
flex
scotch
];

postPatch = ''
Expand All @@ -96,6 +101,11 @@ stdenv.mkDerivation rec {
'';

buildPhase = ''
cat <<EOF > 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
Expand Down

0 comments on commit 682bae4

Please sign in to comment.