2021-11-30 15:58:58 +01:00
|
|
|
{
|
|
|
|
stdenv
|
|
|
|
, lib
|
|
|
|
, cmake
|
|
|
|
, mpi
|
|
|
|
, gitBranch ? "master"
|
2021-12-13 11:52:13 +01:00
|
|
|
, gitURL ? "ssh://git@bscpm03.bsc.es/rarias/ovni.git"
|
|
|
|
, gitCommit ? null
|
2021-11-30 15:58:58 +01:00
|
|
|
# By default use debug
|
|
|
|
, enableDebug ? true
|
|
|
|
}:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ovni";
|
|
|
|
version = "${src.shortRev}";
|
|
|
|
|
|
|
|
buildInputs = [ cmake mpi ];
|
|
|
|
|
|
|
|
cmakeBuildType = if (enableDebug) then "Debug" else "Release";
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
src = builtins.fetchGit ({
|
|
|
|
url = gitURL;
|
|
|
|
ref = gitBranch;
|
|
|
|
} // optionalAttrs (gitCommit != null) ({
|
|
|
|
rev = gitCommit;
|
|
|
|
}));
|
|
|
|
}
|