2016-03-09 00:05:46 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetch
|
|
|
|
, cmake
|
|
|
|
, zlib
|
|
|
|
, ncurses
|
|
|
|
, swig
|
|
|
|
, which
|
|
|
|
, libedit
|
|
|
|
, llvm
|
|
|
|
, clang-unwrapped
|
|
|
|
, python
|
|
|
|
, version
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "lldb-${version}";
|
|
|
|
|
2016-08-30 19:56:01 +01:00
|
|
|
src = fetch "lldb" "18z8vhfgh4m57hl66i83cp4d4mv3i86z2hjhbp5rvqs7d88li49l";
|
2016-06-18 21:47:43 +01:00
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
# Hack around broken standalone builf as of 3.8
|
|
|
|
unpackFile ${llvm.src}
|
|
|
|
srcDir="$(ls -d lldb-*.src)"
|
|
|
|
mkdir -p "$srcDir/tools/lib/Support"
|
|
|
|
cp "$(ls -d llvm-*.src)/lib/Support/regex_impl.h" "$srcDir/tools/lib/Support/"
|
2016-03-09 00:05:46 +00:00
|
|
|
'';
|
|
|
|
|
2016-08-30 20:22:53 +01:00
|
|
|
buildInputs = [ cmake python which swig ncurses zlib libedit llvm ];
|
2016-03-09 00:05:46 +00:00
|
|
|
|
2016-08-30 20:22:53 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-03-09 00:05:46 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DLLDB_PATH_TO_LLVM_BUILD=${llvm}"
|
2016-06-18 21:47:43 +01:00
|
|
|
"-DLLVM_MAIN_INCLUDE_DIR=${llvm}/include"
|
2016-03-09 00:05:46 +00:00
|
|
|
"-DLLDB_PATH_TO_CLANG_BUILD=${clang-unwrapped}"
|
2016-06-18 21:47:43 +01:00
|
|
|
"-DCLANG_MAIN_INCLUDE_DIR=${clang-unwrapped}/include"
|
2016-03-09 00:05:46 +00:00
|
|
|
"-DPYTHON_VERSION_MAJOR=2"
|
|
|
|
"-DPYTHON_VERSION_MINOR=7"
|
2016-11-28 17:55:04 +00:00
|
|
|
"-DLLDB_DISABLE_LIBEDIT=1" # https://llvm.org/bugs/show_bug.cgi?id=28898
|
2016-03-09 00:05:46 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A next-generation high-performance debugger";
|
|
|
|
homepage = http://llvm.org/;
|
2017-02-11 22:13:29 +00:00
|
|
|
license = stdenv.lib.licenses.ncsa;
|
2016-03-09 00:05:46 +00:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|