bscpkgs/garlic/apps/miniamr/default.nix

48 lines
699 B
Nix
Raw Normal View History

2020-12-03 16:57:13 +01:00
{
stdenv
, tampi
, clangOmpss2
, mpi
, nanos6
, mcxx
, variant
}:
with stdenv.lib;
assert (assertOneOf "variant" variant [ "openmp" "openmp-tasks" "ompss-2" ]);
let
cc=mcxx;
in
stdenv.mkDerivation rec {
name = "miniamr";
src = builtins.fetchGit {
2020-12-07 13:47:17 +01:00
url = "ssh://git@bscpm03.bsc.es/ksala/miniamr.git";
2020-12-03 16:57:13 +01:00
ref = "master";
};
postUnpack = ''
sourceRoot=$sourceRoot/${variant}
'';
buildInputs = [ tampi clangOmpss2 mpi nanos6 mcxx ];
makeFlags = [
"CC=${cc.CC}"
"CXX=${cc.CXX}"
];
enableParallelBuilding = true;
installPhase = ''
mkdir -p $out/bin
cp miniAMR.x $out/bin/
'';
programPath = "/bin/miniAMR.x";
hardeningDisable = [ "all" ];
2020-12-03 16:57:13 +01:00
}