bscpkgs/bsc/nanos6/default.nix

62 lines
1.1 KiB
Nix
Raw Normal View History

2020-06-09 00:01:33 +08:00
{
stdenv
2020-11-20 01:50:30 +08:00
, fetchFromGitHub
2020-06-09 00:01:33 +08:00
, automake
, autoconf
2020-11-20 01:50:30 +08:00
, autoreconfHook
2020-06-09 00:01:33 +08:00
, libtool
, pkg-config
, numactl
, hwloc
, papi
2020-06-10 00:21:02 +08:00
, extrae
2020-06-09 00:01:33 +08:00
, boost
2020-11-20 01:50:30 +08:00
, enableJemalloc ? false
, jemalloc ? null
, cachelineBytes ? 64
2020-06-09 00:01:33 +08:00
}:
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "nanos6";
2020-11-20 01:50:30 +08:00
version = "2.5";
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}";
sha256 = "1wyr8liyz1l7rbf5flxihabasm887bq2jcp2csma7b9rhrfyhkm1";
2020-06-09 00:01:33 +08:00
};
2020-11-20 01:50:30 +08:00
prePatch = ''
patchShebangs scripts/generate_config.sh
'';
enableParallelBuilding = true;
2020-06-09 00:01:33 +08:00
preConfigure = ''
2020-11-20 01:50:30 +08:00
export CACHELINE_WIDTH=${toString cachelineBytes}
2020-06-09 00:01:33 +08:00
'';
2020-11-20 01:50:30 +08:00
configureFlags = [] ++
optional enableJemalloc "--with-jemalloc=${jemalloc}";
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
buildInputs = [
2020-11-20 01:50:30 +08:00
autoreconfHook
2020-06-09 00:01:33 +08:00
autoconf
automake
libtool
pkg-config
boost
numactl
hwloc
papi ]
2020-06-10 00:21:02 +08:00
++ (if (extrae != null) then [extrae] else []);
2020-06-09 00:01:33 +08:00
}