bscpkgs/bsc/extrae/default.nix

99 lines
2.0 KiB
Nix
Raw Normal View History

2020-06-09 00:01:33 +08:00
{ stdenv
2020-08-27 01:20:17 +08:00
, fetchFromGitHub
2020-06-09 00:01:33 +08:00
, boost
, libdwarf
, libelf
, libxml2
, libunwind
, papi
, binutils-unwrapped
, libiberty
, gfortran
, xml2
2020-08-27 01:20:17 +08:00
, which
2020-06-09 00:31:23 +08:00
, mpi ? null
2020-06-09 00:01:33 +08:00
, cuda ? null
2020-06-10 20:28:10 +08:00
, llvmPackages
, autoreconfHook
2020-08-27 01:20:17 +08:00
, python37Packages
, installShellFiles
2020-06-09 00:01:33 +08:00
}:
stdenv.mkDerivation rec {
name = "extrae";
2020-08-27 01:20:17 +08:00
version = "3.8.3";
2020-06-09 00:01:33 +08:00
2020-06-10 20:28:10 +08:00
# src = fetchurl {
# url = "https://ftp.tools.bsc.es/extrae/${name}-${version}-src.tar.bz2";
# sha256 = "0y036qc7y30pfj1mnb9nzv2vmxy6xxiy4pgfci6l3jc0lccdsgf8";
# };
2020-08-27 01:20:17 +08:00
src = fetchFromGitHub {
owner = "rodarima";
#owner = "bsc-performance-tools";
repo = "extrae";
rev = "a8ec6882c03d130f88b09f2114887101ca9f6b09";
#rev = "${version}";
sha256 = "02gwl17r63kica6lxycyn10a0r2ciycf6g3cdq5cna5zl351qf31";
2020-06-09 00:01:33 +08:00
};
2020-06-10 00:21:02 +08:00
enableParallelBuilding = true;
2020-06-09 00:01:33 +08:00
2020-08-27 01:20:17 +08:00
nativeBuildInputs = [ installShellFiles ];
2020-06-10 20:28:10 +08:00
buildInputs = [
autoreconfHook
gfortran
libunwind
binutils-unwrapped
boost
boost.dev
libiberty
mpi
xml2
2020-08-27 01:20:17 +08:00
which
2020-06-10 20:28:10 +08:00
libxml2.dev
2020-08-27 01:20:17 +08:00
python37Packages.sphinx
2020-06-10 20:28:10 +08:00
]
++ stdenv.lib.optional stdenv.cc.isClang llvmPackages.openmp;
2020-06-09 00:01:33 +08: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-09 00:31:23 +08:00
${if (mpi != null) then ''--with-mpi=${mpi}''
else ''--without-mpi''}
2020-06-09 00:01:33 +08:00
--without-dyninst)
'';
2020-08-27 01:20:17 +08:00
# Install the manuals only by hand, as we don't want to pull the complete
# LaTeX world
postBuild = ''
make -C docs man
'';
postInstall = ''
installManPage docs/builds/man/*/*
'';
2020-06-09 00:01:33 +08:00
# ++ (
# if (openmp)
# then [ "--enable-openmp" ]
# else []
# );
}