bscpkgs/garlic/apps/hpcg/default.nix

45 lines
640 B
Nix
Raw Normal View History

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
, mpi ? null
, gitBranch
2020-07-13 16:46:44 +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-22 13:32:20 +02:00
++ optional (mcxx != null) mcxx
++ optional (nanos6 != null) nanos6
++ optional (mpi != null) mpi;
2020-07-13 16:46:44 +02:00
makeFlags = [
2020-12-03 18:06:51 +01:00
"CC=${cc.CC}"
"CXX=${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
}