bscpkgs/bsc/nanos6/git.nix

65 lines
1.2 KiB
Nix
Raw Normal View History

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