diff --git a/pkgs/extrae/default.nix b/pkgs/extrae/default.nix index 2ceec916..a6827076 100644 --- a/pkgs/extrae/default.nix +++ b/pkgs/extrae/default.nix @@ -20,6 +20,7 @@ #, python3Packages , installShellFiles , symlinkJoin +, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling }: let @@ -87,7 +88,7 @@ stdenv.mkDerivation rec { --enable-sampling --with-unwind=${libunwind.dev} --with-xml-prefix=${libxml2.dev} - --with-papi=${papi} + ${lib.optionalString enablePapi "--with-papi=${papi}"} ${if (mpi != null) then ''--with-mpi=${mpi}'' else ''--without-mpi''} --without-dyninst) diff --git a/pkgs/nanos6/default.nix b/pkgs/nanos6/default.nix index 64ee2888..c419f2d9 100644 --- a/pkgs/nanos6/default.nix +++ b/pkgs/nanos6/default.nix @@ -16,6 +16,7 @@ , jemallocNanos6 ? null , cachelineBytes ? 64 , enableGlibcxxDebug ? false +, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling , useGit ? false , gitUrl ? "ssh://git@bscpm04.bsc.es/nanos6/nanos6" , gitBranch ? "master" @@ -97,16 +98,14 @@ in # TODO: papi_version is needed for configure: # ./configure: line 27378: papi_version: command not found # This probably breaks cross-compilation - papi - ]; + ] ++ lib.optionals enablePapi [ papi ]; buildInputs = [ boost numactl hwloc - papi ovni - ]; + ] ++ lib.optionals enablePapi [ papi ]; # Create a script that sets NANOS6_HOME postInstall = '' diff --git a/pkgs/nosv/default.nix b/pkgs/nosv/default.nix index 0c02fc99..1b33e03d 100644 --- a/pkgs/nosv/default.nix +++ b/pkgs/nosv/default.nix @@ -7,7 +7,7 @@ , numactl , hwloc , papi -, enablePapi ? true +, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling , cacheline ? 64 # bits , ovni ? null , useGit ? false