2020-07-13 16:46:44 +02:00
|
|
|
{
|
|
|
|
stdenv
|
2020-10-08 17:42:17 +02:00
|
|
|
, cc
|
2020-10-22 13:32:20 +02:00
|
|
|
, nanos6 ? null
|
|
|
|
, mcxx ? null
|
2020-10-13 19:20:24 +02:00
|
|
|
, mpi ? null
|
|
|
|
, gitBranch
|
2020-07-13 16:46:44 +02:00
|
|
|
}:
|
|
|
|
|
2020-10-13 19:20:24 +02:00
|
|
|
with stdenv.lib;
|
2020-07-13 16:46:44 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "hpcg";
|
|
|
|
|
|
|
|
src = builtins.fetchGit {
|
2020-10-08 17:42:17 +02:00
|
|
|
url = "ssh://git@bscpm02.bsc.es/rpenacob/garlic-hpcg.git";
|
|
|
|
ref = "${gitBranch}";
|
2020-07-13 16:46:44 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
#export NIX_DEBUG=6
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [
|
2020-10-08 17:42:17 +02:00
|
|
|
cc
|
2020-10-13 19:20:24 +02:00
|
|
|
]
|
2020-10-22 13:32:20 +02:00
|
|
|
++ optional (mcxx != null) mcxx
|
|
|
|
++ optional (nanos6 != null) nanos6
|
2020-10-13 19:20:24 +02:00
|
|
|
++ optional (mpi != null) mpi;
|
2020-07-13 16:46:44 +02:00
|
|
|
|
2020-10-08 18:24:56 +02:00
|
|
|
makeFlags = [
|
|
|
|
"CC=${cc.cc.CC}"
|
|
|
|
"CXX=${cc.cc.CXX}"
|
|
|
|
];
|
|
|
|
|
2020-07-13 16:46:44 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp bin/* $out/bin/
|
|
|
|
'';
|
|
|
|
|
2020-10-13 17:05:36 +02:00
|
|
|
programPath = "/bin/xhpcg";
|
|
|
|
|
2020-07-13 16:46:44 +02:00
|
|
|
}
|