bscpkgs/garlic/apps/hpcg/default.nix

47 lines
634 B
Nix
Raw Normal View History

2020-07-13 22:46:44 +08:00
{
stdenv
2020-10-08 23:42:17 +08:00
, cc
2020-10-13 20:59:49 +08:00
, mpi
2020-10-08 23:42:17 +08:00
, gitBranch ? "garlic/seq"
, makefileName ? "Linux_Serial"
2020-07-13 22:46:44 +08:00
}:
stdenv.mkDerivation rec {
name = "hpcg";
src = builtins.fetchGit {
2020-10-08 23:42:17 +08:00
url = "ssh://git@bscpm02.bsc.es/rpenacob/garlic-hpcg.git";
ref = "${gitBranch}";
2020-07-13 22:46:44 +08:00
};
prePatch = ''
#export NIX_DEBUG=6
'';
buildInputs = [
2020-10-08 23:42:17 +08:00
cc
2020-10-13 20:59:49 +08:00
mpi
2020-07-13 22:46:44 +08:00
];
makeFlags = [
"CC=${cc.cc.CC}"
"CXX=${cc.cc.CXX}"
];
2020-07-13 22:46:44 +08:00
enableParallelBuilding = true;
configurePhase = ''
mkdir build
cd build
2020-10-08 23:42:17 +08:00
../configure ${makefileName}
2020-07-13 22:46:44 +08:00
'';
installPhase = ''
mkdir -p $out/bin
cp bin/* $out/bin/
'';
2020-10-13 23:05:36 +08:00
programPath = "/bin/xhpcg";
2020-07-13 22:46:44 +08:00
}