jungle/pkgs/tampi/default.nix
Aleix Boné afeb415c98 Fix strictDeps tampi
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2025-10-01 15:45:20 +02:00

67 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@bscpm04.bsc.es/interoperability/tampi.git"
, gitBranch ? "master"
, gitCommit ? "f6455db9d3124ae36e715a4874fd49720e79f20a"
}:
with lib;
assert enableOvni -> (ovni != null);
let
release = rec {
version = "4.1";
src = fetchFromGitHub {
owner = "bsc-pm";
repo = "tampi";
rev = "v${version}";
hash = "sha256-SwfPSnwcZnRnSgNvCD5sFSUJRpWINqI5I4adj5Hh+XY=";
};
};
git = rec {
version = src.shortRev;
src = builtins.fetchGit {
url = gitUrl;
ref = gitBranch;
rev = gitCommit;
};
};
source = if (useGit) then git else release;
in stdenv.mkDerivation {
pname = "tampi";
inherit (source) src version;
enableParallelBuilding = true;
separateDebugInfo = true;
nativeBuildInputs = [
autoconf
automake
autoreconfHook
gcc
gnumake
libtool
];
buildInputs = [
boost
mpi
] ++ optional (enableOvni) ovni;
configureFlags = optional (enableOvni) "--with-ovni=${ovni}";
dontDisableStatic = true;
hardeningDisable = [ "all" ];
}