bscpkgs/garlic/apps/ifsker/default.nix

55 lines
965 B
Nix
Raw Normal View History

2020-12-03 18:49:28 +01:00
{
stdenv
, mpi
, gfortran
, tampi
, nanos6
, mcxx
2021-03-21 17:54:37 +01:00
, gitBranch ? "garlic/mpi+isend+seq"
2020-12-03 18:49:28 +01:00
}:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "ifsker";
src = builtins.fetchGit {
2021-03-21 17:54:37 +01:00
url = "ssh://git@bscpm03.bsc.es/garlic/apps/ifsker.git";
ref = gitBranch;
2020-12-03 18:49:28 +01:00
};
buildInputs = [ tampi mpi nanos6 mcxx gfortran ];
preferLocalBuild = true;
# Mercurium seems to fail when building with fortran in parallel
enableParallelBuilding = false;
# FIXME: Patch mcxx to use other directory than $HOME for the lock
# files.
preConfigure = ''
export TAMPI_HOME=${tampi}
# $HOME is required for the lock files by mcxx to compile fortran.
# So we use the $TMPDIR to store them.
export HOME=$TMPDIR
'';
makeFlags = [
"-f" "Makefile.gcc"
];
installPhase = ''
mkdir -p $out/bin
2021-03-21 17:54:37 +01:00
cp ${name} $out/bin/
mkdir -p $out/etc
cp -r data $out/etc/
cp nanos6.toml $out/etc
2020-12-03 18:49:28 +01:00
'';
2021-03-21 17:54:37 +01:00
programPath = "/bin/${name}";
2020-12-03 18:49:28 +01:00
}