2015-09-12 07:38:32 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetch
|
|
|
|
, cmake
|
|
|
|
, zlib
|
|
|
|
, ncurses
|
|
|
|
, swig
|
|
|
|
, which
|
|
|
|
, libedit
|
|
|
|
, llvm
|
|
|
|
, clang-unwrapped
|
2016-10-18 20:53:45 +00:00
|
|
|
, python2
|
2015-09-12 07:38:32 +00:00
|
|
|
, version
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "lldb-${version}";
|
|
|
|
|
2016-01-07 05:16:47 +00:00
|
|
|
src = fetch "lldb" "008fdbyza13ym3v0xpans4z4azw4y16hcbgrrnc4rx2mxwaw62ws";
|
2015-09-12 07:38:32 +00:00
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i 's|/usr/bin/env||' \
|
|
|
|
scripts/Python/finish-swig-Python-LLDB.sh \
|
|
|
|
scripts/Python/build-swig-Python.sh
|
|
|
|
'';
|
|
|
|
|
2016-10-18 20:53:45 +00:00
|
|
|
buildInputs = [ cmake python2 which swig ncurses zlib libedit ];
|
2015-09-12 07:38:32 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
export CXXFLAGS="-pthread"
|
|
|
|
export LDFLAGS="-ldl"
|
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DLLDB_PATH_TO_LLVM_BUILD=${llvm}"
|
|
|
|
"-DLLDB_PATH_TO_CLANG_BUILD=${clang-unwrapped}"
|
|
|
|
"-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
|
2015-09-12 07:38:32 +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;
|
2015-09-12 07:38:32 +00:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|