2020-06-10 18:55:30 +02:00
|
|
|
{
|
|
|
|
stdenv
|
2022-09-01 16:27:29 +02:00
|
|
|
, lib
|
2020-06-10 18:55:30 +02:00
|
|
|
, automake
|
|
|
|
, autoconf
|
|
|
|
, libtool
|
|
|
|
, pkg-config
|
2020-11-03 19:08:19 +01:00
|
|
|
, perl
|
2020-06-10 18:55:30 +02:00
|
|
|
, numactl
|
|
|
|
, hwloc
|
|
|
|
, papi
|
|
|
|
, boost
|
|
|
|
, autoreconfHook
|
2021-06-02 11:35:30 +02:00
|
|
|
, enableJemalloc ? true
|
2020-10-19 18:42:41 +02:00
|
|
|
, jemalloc ? null
|
2020-11-19 18:50:30 +01:00
|
|
|
, cachelineBytes ? 64
|
2021-06-02 11:35:30 +02:00
|
|
|
, enableGlibcxxDebug ? false
|
|
|
|
, gitUrl ? "ssh://git@bscpm03.bsc.es/nanos6/nanos6"
|
|
|
|
, gitBranch ? "master"
|
2020-06-10 18:55:30 +02:00
|
|
|
}:
|
|
|
|
|
2022-09-01 16:27:29 +02:00
|
|
|
with lib;
|
2020-06-10 18:55:30 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nanos6";
|
2020-09-22 17:42:36 +02:00
|
|
|
version = "${src.shortRev}";
|
2020-06-10 18:55:30 +02:00
|
|
|
|
|
|
|
src = builtins.fetchGit {
|
2021-06-02 11:35:30 +02:00
|
|
|
url = gitUrl;
|
|
|
|
ref = gitBranch;
|
2020-06-10 18:55:30 +02:00
|
|
|
};
|
|
|
|
|
2020-11-03 19:08:19 +01:00
|
|
|
prePatch = ''
|
|
|
|
patchShebangs scripts/generate_config.sh
|
|
|
|
'';
|
|
|
|
|
2020-06-10 18:55:30 +02:00
|
|
|
enableParallelBuilding = true;
|
2021-06-02 12:41:47 +02:00
|
|
|
dontStrip = true;
|
2020-06-10 18:55:30 +02:00
|
|
|
|
|
|
|
preConfigure = ''
|
2020-12-17 15:27:50 +01:00
|
|
|
export CACHELINE_WIDTH=${toString cachelineBytes}
|
2020-07-15 12:21:48 +02:00
|
|
|
export NANOS6_GIT_VERSION=${src.rev}
|
2021-06-02 11:35:30 +02:00
|
|
|
export NANOS6_GIT_BRANCH=${gitBranch}
|
2020-06-10 18:55:30 +02:00
|
|
|
'';
|
|
|
|
|
2021-06-02 11:35:30 +02:00
|
|
|
configureFlags = []
|
|
|
|
++ (optional enableJemalloc "--with-jemalloc=${jemalloc}")
|
|
|
|
++ (optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG");
|
2020-10-19 18:42:41 +02:00
|
|
|
|
2020-07-15 12:21:48 +02:00
|
|
|
# The "bindnow" flags are incompatible with ifunc resolution mechanism. We
|
|
|
|
# disable all by default, which includes bindnow.
|
|
|
|
hardeningDisable = [ "all" ];
|
2020-06-10 18:55:30 +02:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
autoconf
|
|
|
|
automake
|
|
|
|
libtool
|
|
|
|
pkg-config
|
|
|
|
boost
|
|
|
|
numactl
|
|
|
|
hwloc
|
2023-04-11 20:32:49 +02:00
|
|
|
papi ];
|
2020-06-10 18:55:30 +02:00
|
|
|
}
|