2020-07-13 16:46:44 +02:00
|
|
|
{
|
|
|
|
stdenv
|
2020-10-08 17:42:17 +02:00
|
|
|
, cc
|
|
|
|
, gitBranch ? "garlic/seq"
|
|
|
|
, makefileName ? "Linux_Serial"
|
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-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;
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2020-10-08 17:42:17 +02:00
|
|
|
../configure ${makefileName}
|
2020-07-13 16:46:44 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp bin/* $out/bin/
|
|
|
|
'';
|
|
|
|
|
|
|
|
}
|