bscpkgs/bsc/nanos6/default.nix

76 lines
1.4 KiB
Nix
Raw Normal View History

2020-06-09 00:01:33 +08:00
{
stdenv
2022-09-01 22:27:29 +08:00
, lib
2020-11-20 01:50:30 +08:00
, fetchFromGitHub
2020-06-09 00:01:33 +08:00
, automake
, autoconf
, libtool
, pkg-config
, numactl
, hwloc
, papi
, boost
2023-03-03 01:10:06 +08:00
, ovni
2021-03-04 02:05:33 +08:00
, enableJemalloc ? true
2020-11-20 01:50:30 +08:00
, jemalloc ? null
, cachelineBytes ? 64
, enableGlibcxxDebug ? false
2020-06-09 00:01:33 +08:00
}:
2021-03-04 02:05:33 +08:00
assert enableJemalloc -> (jemalloc != null);
2022-09-01 22:27:29 +08:00
with lib;
2020-06-09 00:01:33 +08:00
stdenv.mkDerivation rec {
pname = "nanos6";
2023-05-30 15:41:17 +08:00
version = "3.0";
2020-06-09 00:01:33 +08:00
2020-11-20 01:50:30 +08:00
src = fetchFromGitHub {
owner = "bsc-pm";
repo = "nanos6";
rev = "version-${version}";
2023-05-30 15:41:17 +08:00
sha256 = "sha256-XEG8/8yQv5/OdSyK9Kig8xuWe6mTZ1eQKhXx3fXlQ1Y=";
2020-06-09 00:01:33 +08:00
};
2020-11-20 01:50:30 +08:00
prePatch = ''
patchShebangs scripts/generate_config.sh
2023-05-30 15:41:17 +08:00
patchShebangs autogen.sh
2020-11-20 01:50:30 +08:00
'';
enableParallelBuilding = true;
2020-06-09 00:01:33 +08:00
preConfigure = ''
2020-11-20 01:50:30 +08:00
export CACHELINE_WIDTH=${toString cachelineBytes}
2023-05-30 15:41:17 +08:00
./autogen.sh
2020-06-09 00:01:33 +08:00
'';
2023-03-03 01:10:06 +08:00
configureFlags = [
2023-05-30 15:41:17 +08:00
"--with-hwloc=${hwloc}"
"--disable-all-instrumentations"
"--enable-ovni-instrumentation"
2023-03-03 01:10:06 +08:00
"--with-ovni=${ovni}"
] ++
2021-06-30 22:33:51 +08:00
(optional enableJemalloc "--with-jemalloc=${jemalloc}") ++
(optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG");
2020-06-15 17:54:22 +08:00
2020-11-20 01:50:30 +08:00
# The "bindnow" flags are incompatible with ifunc resolution mechanism. We
# disable all by default, which includes bindnow.
hardeningDisable = [ "all" ];
2020-06-09 00:01:33 +08:00
2022-02-24 03:05:47 +08:00
# Keep debug symbols in the verbose variant of the library
dontStrip = true;
2020-06-09 00:01:33 +08:00
buildInputs = [
autoconf
automake
libtool
pkg-config
boost
numactl
hwloc
2021-06-30 22:33:51 +08:00
papi
2023-03-03 01:10:06 +08:00
ovni
2023-04-12 02:32:49 +08:00
];
2020-06-09 00:01:33 +08:00
}