22 src = fetch "lldb" "0klsscg1sczc4nw2l53xggi969k361cng2sjjrfp3bv4g5x14s4v";
24 nativeBuildInputs = [ cmake perl python3 which swig ];
25 buildInputs = [ ncurses zlib libedit libxml2 llvm ]
26 ++ lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ];
30 # Fix up various paths that assume llvm and clang are installed in the same place
31 sed -i 's,".*ClangConfig.cmake","${clang-unwrapped}/lib/cmake/clang/ClangConfig.cmake",' \
32 cmake/modules/LLDBStandalone.cmake
33 sed -i 's,".*tools/clang/include","${clang-unwrapped}/include",' \
34 cmake/modules/LLDBStandalone.cmake
35 sed -i 's,"$.LLVM_LIBRARY_DIR.",${llvm}/lib ${clang-unwrapped}/lib,' \
36 cmake/modules/LLDBStandalone.cmake
37 sed -i -e 's,message(SEND_ERROR "Cannot find debugserver on system."),,' \
38 -e 's,string(STRIP ''${XCODE_DEV_DIR} XCODE_DEV_DIR),,' \
39 tools/debugserver/source/CMakeLists.txt
41 # Fix /usr/bin references for sandboxed builds.
46 "-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic
47 "-DSKIP_DEBUGSERVER=ON"
50 CXXFLAGS = "-fno-rtti";
51 hardeningDisable = [ "format" ];
53 NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-I${libxml2.dev}/include/libxml2";
56 mkdir -p $out/share/man/man1
57 cp ../docs/lldb.1 $out/share/man/man1/
61 description = "A next-generation high-performance debugger";
62 homepage = "https://llvm.org/";
63 license = licenses.ncsa;
64 platforms = platforms.all;