bscpkgs/pkgs/tampi/default.nix

63 lines
1.2 KiB
Nix
Raw Normal View History

2020-06-08 18:01:33 +02:00
{
stdenv
, lib
, 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
, enableOvni ? true
, ovni ? null
, 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
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;
2020-06-15 12:45:16 +02:00
enableParallelBuilding = true;
separateDebugInfo = true;
buildInputs = [
autoreconfHook
automake
autoconf
libtool
gnumake
boost
mpi
gcc
] ++ optional (enableOvni) ovni;
configureFlags = optional (enableOvni) "--with-ovni=${ovni}";
2020-06-15 12:45:16 +02:00
dontDisableStatic = true;
hardeningDisable = [ "all" ];
2020-06-08 18:01:33 +02:00
}