2021-01-18 18:42:07 +01:00
|
|
|
{
|
|
|
|
stdenv
|
2022-09-01 16:27:29 +02:00
|
|
|
, lib
|
2021-01-18 18:42:07 +01:00
|
|
|
, babeltrace2
|
|
|
|
, pkg-config
|
|
|
|
, uthash
|
2021-06-22 14:55:52 +02:00
|
|
|
, enableTest ? false
|
|
|
|
, mpi ? null
|
|
|
|
, clangOmpss2 ? null
|
|
|
|
, tampi ? null
|
2021-01-18 18:42:07 +01:00
|
|
|
}:
|
|
|
|
|
2022-09-01 16:27:29 +02:00
|
|
|
with lib;
|
2021-06-22 14:55:52 +02:00
|
|
|
|
|
|
|
assert (enableTest -> (mpi != null));
|
|
|
|
assert (enableTest -> (clangOmpss2 != null));
|
|
|
|
assert (enableTest -> (tampi != null));
|
|
|
|
|
2021-01-18 18:42:07 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2021-02-15 17:44:20 +01:00
|
|
|
pname = "cn6";
|
2021-01-18 18:42:07 +01:00
|
|
|
version = "${src.shortRev}";
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
babeltrace2
|
|
|
|
pkg-config
|
|
|
|
uthash
|
2021-06-22 14:55:52 +02:00
|
|
|
mpi
|
|
|
|
] ++ optionals (enableTest) [ mpi clangOmpss2 tampi ];
|
2021-01-18 18:42:07 +01:00
|
|
|
|
|
|
|
src = builtins.fetchGit {
|
2021-02-15 17:44:20 +01:00
|
|
|
url = "ssh://git@bscpm03.bsc.es/rarias/cn6.git";
|
2021-01-18 18:42:07 +01:00
|
|
|
ref = "master";
|
2021-04-19 17:44:08 +02:00
|
|
|
rev = "c72c3b66b720c2a33950f536fc819051c8f20a69";
|
2021-01-18 18:42:07 +01:00
|
|
|
};
|
|
|
|
|
2021-03-19 11:39:58 +01:00
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
2021-06-22 14:55:52 +02:00
|
|
|
|
|
|
|
postBuild = optionalString (enableTest) ''
|
|
|
|
(
|
|
|
|
cd test
|
|
|
|
make timediff timediff_mpi
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = optionalString (enableTest) ''
|
|
|
|
(
|
|
|
|
cd test
|
|
|
|
cp timediff timediff_mpi sync-err.sh $out/bin/
|
|
|
|
)
|
|
|
|
'';
|
2021-01-18 18:42:07 +01:00
|
|
|
}
|