nanos6: allow the git url and branch to be specified
This commit is contained in:
parent
fb2b3cbe06
commit
11a521ff51
@ -11,9 +11,12 @@
|
|||||||
, extrae
|
, extrae
|
||||||
, boost
|
, boost
|
||||||
, autoreconfHook
|
, autoreconfHook
|
||||||
, enableJemalloc ? false
|
, enableJemalloc ? true
|
||||||
, jemalloc ? null
|
, jemalloc ? null
|
||||||
, cachelineBytes ? 64
|
, cachelineBytes ? 64
|
||||||
|
, enableGlibcxxDebug ? false
|
||||||
|
, gitUrl ? "ssh://git@bscpm03.bsc.es/nanos6/nanos6"
|
||||||
|
, gitBranch ? "master"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
@ -21,11 +24,10 @@ with stdenv.lib;
|
|||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "nanos6";
|
pname = "nanos6";
|
||||||
version = "${src.shortRev}";
|
version = "${src.shortRev}";
|
||||||
branch = "master";
|
|
||||||
|
|
||||||
src = builtins.fetchGit {
|
src = builtins.fetchGit {
|
||||||
url = "ssh://git@bscpm03.bsc.es/nanos6/nanos6";
|
url = gitUrl;
|
||||||
ref = branch;
|
ref = gitBranch;
|
||||||
};
|
};
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
@ -37,11 +39,12 @@ stdenv.mkDerivation rec {
|
|||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
export CACHELINE_WIDTH=${toString cachelineBytes}
|
export CACHELINE_WIDTH=${toString cachelineBytes}
|
||||||
export NANOS6_GIT_VERSION=${src.rev}
|
export NANOS6_GIT_VERSION=${src.rev}
|
||||||
export NANOS6_GIT_BRANCH=${branch}
|
export NANOS6_GIT_BRANCH=${gitBranch}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configureFlags = [] ++
|
configureFlags = []
|
||||||
optional enableJemalloc "--with-jemalloc=${jemalloc}";
|
++ (optional enableJemalloc "--with-jemalloc=${jemalloc}")
|
||||||
|
++ (optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG");
|
||||||
|
|
||||||
# The "bindnow" flags are incompatible with ifunc resolution mechanism. We
|
# The "bindnow" flags are incompatible with ifunc resolution mechanism. We
|
||||||
# disable all by default, which includes bindnow.
|
# disable all by default, which includes bindnow.
|
||||||
|
@ -78,10 +78,12 @@ let
|
|||||||
nanos6 = bsc.nanos6Release;
|
nanos6 = bsc.nanos6Release;
|
||||||
nanos6Release = callPackage ./bsc/nanos6/default.nix { };
|
nanos6Release = callPackage ./bsc/nanos6/default.nix { };
|
||||||
nanos6Git = callPackage ./bsc/nanos6/git.nix { };
|
nanos6Git = callPackage ./bsc/nanos6/git.nix { };
|
||||||
|
|
||||||
nanos6Debug = bsc.nanos6.overrideAttrs (old: {
|
nanos6Debug = bsc.nanos6.overrideAttrs (old: {
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
enableDebugging = true;
|
enableDebugging = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
nanos6GlibcxxDebug = bsc.nanos6Debug.override {
|
nanos6GlibcxxDebug = bsc.nanos6Debug.override {
|
||||||
enableGlibcxxDebug = true;
|
enableGlibcxxDebug = true;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user