2020-06-08 18:01:33 +02:00
|
|
|
{ stdenv
|
2022-09-01 16:27:29 +02:00
|
|
|
, lib
|
2020-08-26 19:20:17 +02:00
|
|
|
, fetchFromGitHub
|
2020-06-08 18:01:33 +02:00
|
|
|
, boost
|
|
|
|
, libdwarf
|
|
|
|
, libelf
|
|
|
|
, libxml2
|
|
|
|
, libunwind
|
|
|
|
, papi
|
|
|
|
, binutils-unwrapped
|
|
|
|
, libiberty
|
|
|
|
, gfortran
|
|
|
|
, xml2
|
2020-08-26 19:20:17 +02:00
|
|
|
, which
|
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-08-26 19:20:17 +02:00
|
|
|
, python37Packages
|
|
|
|
, installShellFiles
|
2023-03-02 11:43:35 +01:00
|
|
|
, symlinkJoin
|
2020-06-08 18:01:33 +02:00
|
|
|
}:
|
|
|
|
|
2023-03-02 11:43:35 +01:00
|
|
|
let
|
|
|
|
libdwarfBundle = symlinkJoin {
|
|
|
|
name = "libdwarfBundle";
|
|
|
|
paths = [ libdwarf.dev libdwarf.lib libdwarf.out ];
|
|
|
|
};
|
|
|
|
in
|
|
|
|
|
2020-06-08 18:01:33 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2020-11-11 13:17:03 +01:00
|
|
|
pname = "extrae";
|
2023-03-02 11:43:35 +01:00
|
|
|
version = "4.0.1";
|
2020-08-26 19:20:17 +02:00
|
|
|
src = fetchFromGitHub {
|
2020-11-11 12:19:07 +01:00
|
|
|
owner = "bsc-performance-tools";
|
2020-08-26 19:20:17 +02:00
|
|
|
repo = "extrae";
|
2020-11-11 12:19:07 +01:00
|
|
|
rev = "${version}";
|
2023-03-02 11:43:35 +01:00
|
|
|
sha256 = "SlMYxNQXJ0Xg90HmpnotUR3tEPVVBXhk1NtEBJwGBR4=";
|
2020-06-08 18:01:33 +02:00
|
|
|
};
|
|
|
|
|
2023-03-02 11:43:35 +01:00
|
|
|
# FIXME: Waiting for German to merge this patch. Still not in master, merged
|
|
|
|
# on 2023-03-01 in devel branch (after 3 years), see:
|
|
|
|
# https://github.com/bsc-performance-tools/extrae/pull/45
|
2020-11-11 12:19:07 +01:00
|
|
|
patches = [ ./use-command.patch ];
|
|
|
|
|
2020-06-09 18:21:02 +02:00
|
|
|
enableParallelBuilding = true;
|
2021-04-21 19:42:37 +02:00
|
|
|
hardeningDisable = [ "all" ];
|
2020-06-08 18:01:33 +02:00
|
|
|
|
2020-08-26 19:20:17 +02:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2020-06-10 14:28:10 +02:00
|
|
|
buildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
gfortran
|
|
|
|
libunwind
|
|
|
|
binutils-unwrapped
|
|
|
|
boost
|
|
|
|
boost.dev
|
|
|
|
libiberty
|
|
|
|
mpi
|
|
|
|
xml2
|
2020-08-26 19:20:17 +02:00
|
|
|
which
|
2020-06-10 14:28:10 +02:00
|
|
|
libxml2.dev
|
2022-09-01 16:27:29 +02:00
|
|
|
#python37Packages.sphinx
|
2020-06-10 14:28:10 +02:00
|
|
|
]
|
2022-09-01 16:27:29 +02:00
|
|
|
++ 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}"
|
2023-03-02 11:43:35 +01:00
|
|
|
--with-dwarf=${libdwarfBundle}
|
2020-06-08 18:01:33 +02:00
|
|
|
--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)
|
|
|
|
'';
|
|
|
|
|
2020-08-26 19:20:17 +02:00
|
|
|
# Install the manuals only by hand, as we don't want to pull the complete
|
|
|
|
# LaTeX world
|
|
|
|
|
2022-09-01 16:27:29 +02:00
|
|
|
# FIXME: sphinx is broken
|
|
|
|
#postBuild = ''
|
|
|
|
# make -C docs man
|
|
|
|
#'';
|
|
|
|
#
|
|
|
|
#postInstall = ''
|
|
|
|
# installManPage docs/builds/man/*/*
|
|
|
|
#'';
|
2020-08-26 19:20:17 +02:00
|
|
|
|
2020-06-08 18:01:33 +02:00
|
|
|
# ++ (
|
|
|
|
# if (openmp)
|
|
|
|
# then [ "--enable-openmp" ]
|
|
|
|
# else []
|
|
|
|
# );
|
|
|
|
}
|