Archived
1
0
forked from rarias/bscpkgs
This repository has been archived on 2025-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
bscpkgs/pkgs/tampi/default.nix
Rodrigo Arias Mallo 2a953d811c Build TAMPI with ovni support
By default we build TAMPI with ovni support, as it will be disabled in
runtime unless explicitly enabled by the TAMPI_INSTRUMENT=ovni
environment variable.

Reviewed-by: Aleix Roca Nonell <aleix.rocanonell@bsc.es>
2023-11-29 17:49:30 +01:00

63 lines
1.2 KiB
Nix

{
stdenv
, lib
, fetchFromGitHub
, automake
, autoconf
, libtool
, gnumake
, boost
, mpi
, gcc
, autoreconfHook
, enableOvni ? true
, ovni ? null
, useGit ? false
, gitUrl ? "ssh://git@bscpm03.bsc.es/interoperability/tampi.git"
, gitBranch ? "master"
, gitCommit ? "16f92094ca6da25e2f561c000f5fbc2901944f7b"
}:
with lib;
assert enableOvni -> (ovni != null);
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 {
pname = "tampi";
inherit (source) src version;
enableParallelBuilding = true;
separateDebugInfo = true;
buildInputs = [
autoreconfHook
automake
autoconf
libtool
gnumake
boost
mpi
gcc
] ++ optional (enableOvni) ovni;
configureFlags = optional (enableOvni) "--with-ovni=${ovni}";
dontDisableStatic = true;
hardeningDisable = [ "all" ];
}