bscpkgs/bsc/extrae/default.nix

80 lines
1.6 KiB
Nix
Raw Normal View History

2020-06-08 18:01:33 +02:00
{ stdenv
2020-06-10 14:28:10 +02:00
, fetchgit
2020-06-08 18:01:33 +02:00
, boost
, libdwarf
, libelf
, libxml2
, libunwind
, papi
, binutils-unwrapped
, libiberty
, gfortran
, xml2
2020-06-08 18:31:23 +02:00
, mpi ? null
2020-06-08 18:01:33 +02:00
, cuda ? null
2020-06-10 14:28:10 +02:00
, llvmPackages
, autoreconfHook
2020-06-08 18:01:33 +02:00
}:
stdenv.mkDerivation rec {
name = "extrae";
version = "3.7.1";
2020-06-10 14:28:10 +02:00
# src = fetchurl {
# url = "https://ftp.tools.bsc.es/extrae/${name}-${version}-src.tar.bz2";
# sha256 = "0y036qc7y30pfj1mnb9nzv2vmxy6xxiy4pgfci6l3jc0lccdsgf8";
# };
# Use patched Extrae version
src = fetchgit {
url = "https://github.com/rodarima/extrae";
rev = "15883516d6bd802e5b76ff28c4b4a3a5cb113880";
sha256 = "1hmf6400kw5k3j6xdbbd0yw4xhrjhk1kibp6m7r2i000qjgha8v6";
2020-06-08 18:01:33 +02:00
};
2020-06-09 18:21:02 +02:00
enableParallelBuilding = true;
2020-06-08 18:01:33 +02:00
2020-06-10 14:28:10 +02:00
buildInputs = [
autoreconfHook
gfortran
libunwind
binutils-unwrapped
boost
boost.dev
libiberty
mpi
xml2
libxml2.dev
]
++ stdenv.lib.optional stdenv.cc.isClang llvmPackages.openmp;
2020-06-08 18:01:33 +02:00
preConfigure = ''
configureFlagsArray=(
--enable-posix-clock
--with-binutils="${binutils-unwrapped} ${libiberty}"
--with-dwarf=${libdwarf}
--with-elf=${libelf}
--with-boost=${boost.dev}
--enable-instrument-io
--enable-instrument-dynamic-memory
--without-memkind
--enable-merge-in-trace
--disable-online
--without-opencl
--enable-pebs-sampling
--enable-sampling
--with-unwind=${libunwind.dev}
--with-xml-prefix=${libxml2.dev}
--with-papi=${papi}
2020-06-08 18:31:23 +02:00
${if (mpi != null) then ''--with-mpi=${mpi}''
else ''--without-mpi''}
2020-06-08 18:01:33 +02:00
--without-dyninst)
'';
# ++ (
# if (openmp)
# then [ "--enable-openmp" ]
# else []
# );
}