bscpkgs/bsc/nanos6/git.nix

64 lines
1.1 KiB
Nix
Raw Normal View History

2020-06-10 18:55:30 +02:00
{
stdenv
, automake
, autoconf
, libtool
, pkg-config
, perl
2020-06-10 18:55:30 +02:00
, numactl
, hwloc
, papi
, extrae
, boost
, autoreconfHook
2020-10-19 18:42:41 +02:00
, enableJemalloc ? false
, jemalloc ? null
2020-06-10 18:55:30 +02:00
}:
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "nanos6";
version = "${src.shortRev}";
2020-06-10 18:55:30 +02:00
branch = "master";
cacheline-width = "64";
src = builtins.fetchGit {
url = "ssh://git@bscpm02.bsc.es/nanos6/nanos6";
2020-06-10 18:55:30 +02:00
ref = branch;
rev = "bd306f903c7a4396f579402666082f5a7c34570b";
2020-06-10 18:55:30 +02:00
};
prePatch = ''
patchShebangs scripts/generate_config.sh
'';
2020-06-10 18:55:30 +02:00
enableParallelBuilding = true;
preConfigure = ''
export CACHELINE_WIDTH=${cacheline-width}
export NANOS6_GIT_VERSION=${src.rev}
export NANOS6_GIT_BRANCH=${branch}
2020-06-10 18:55:30 +02:00
'';
2020-10-19 18:42:41 +02:00
configureFlags = [] ++
optional enableJemalloc "--with-jemalloc=${jemalloc}";
# 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
perl
2020-06-10 18:55:30 +02:00
boost
numactl
hwloc
papi ]
++ (if (extrae != null) then [extrae] else []);
}