2020-06-08 18:01:33 +02:00
|
|
|
{
|
|
|
|
stdenv
|
2023-11-29 16:59:20 +01:00
|
|
|
, lib
|
2020-11-11 12:24:41 +01:00
|
|
|
, fetchFromGitHub
|
2020-06-08 18:01:33 +02:00
|
|
|
, automake
|
|
|
|
, autoconf
|
|
|
|
, libtool
|
|
|
|
, gnumake
|
|
|
|
, boost
|
|
|
|
, mpi
|
2020-06-26 10:16:41 +02:00
|
|
|
, gcc
|
|
|
|
, autoreconfHook
|
2023-11-29 16:59:20 +01:00
|
|
|
, enableOvni ? true
|
|
|
|
, ovni ? null
|
2023-11-29 16:59:19 +01:00
|
|
|
, useGit ? false
|
|
|
|
, gitUrl ? "ssh://git@bscpm03.bsc.es/interoperability/tampi.git"
|
|
|
|
, gitBranch ? "master"
|
|
|
|
, gitCommit ? "16f92094ca6da25e2f561c000f5fbc2901944f7b"
|
2020-06-26 10:16:41 +02:00
|
|
|
}:
|
2020-06-08 18:01:33 +02:00
|
|
|
|
2023-11-29 16:59:20 +01:00
|
|
|
with lib;
|
|
|
|
|
|
|
|
assert enableOvni -> (ovni != null);
|
|
|
|
|
2023-11-29 16:59:19 +01:00
|
|
|
let
|
|
|
|
release = rec {
|
|
|
|
version = "3.0";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bsc-pm";
|
|
|
|
repo = "tampi";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-qdWBxPsXKM428F2ojt2B6/0ZsQyGzEiojNaqbhDmrks=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
git = rec {
|
|
|
|
version = src.shortRev;
|
|
|
|
src = builtins.fetchGit {
|
|
|
|
url = gitUrl;
|
|
|
|
ref = gitBranch;
|
|
|
|
rev = gitCommit;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
source = if (useGit) then git else release;
|
|
|
|
in stdenv.mkDerivation rec {
|
2020-11-11 12:24:41 +01:00
|
|
|
pname = "tampi";
|
2023-11-29 16:59:19 +01:00
|
|
|
inherit (source) src version;
|
2020-06-15 12:45:16 +02:00
|
|
|
enableParallelBuilding = true;
|
2023-11-20 15:43:29 +01:00
|
|
|
separateDebugInfo = true;
|
2023-11-29 16:59:19 +01:00
|
|
|
buildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
automake
|
|
|
|
autoconf
|
|
|
|
libtool
|
|
|
|
gnumake
|
|
|
|
boost
|
|
|
|
mpi
|
|
|
|
gcc
|
2023-11-29 16:59:20 +01:00
|
|
|
] ++ optional (enableOvni) ovni;
|
|
|
|
configureFlags = optional (enableOvni) "--with-ovni=${ovni}";
|
2020-06-15 12:45:16 +02:00
|
|
|
dontDisableStatic = true;
|
2021-04-21 19:42:37 +02:00
|
|
|
hardeningDisable = [ "all" ];
|
2020-06-08 18:01:33 +02:00
|
|
|
}
|