nixpkgs-suyu/pkgs/development/compilers/llvm/9/lldb.nix

73 lines
1.6 KiB
Nix
Raw Normal View History

2019-09-19 20:19:41 +02:00
{ stdenv
, fetch
, cmake
, zlib
, ncurses
, swig
, which
, libedit
, libxml2
, llvm
, clang-unwrapped
2020-01-12 21:22:29 +01:00
, python3
2019-09-19 20:19:41 +02:00
, version
, darwin
2019-09-20 01:40:47 +02:00
, lit
2019-09-19 20:19:41 +02:00
}:
stdenv.mkDerivation rec {
2019-09-19 20:19:41 +02:00
pname = "lldb";
inherit version;
src = fetch pname "02gb3fbz09kyw8n71218v5v77ip559x3gqbcp8y3w6n3jpbryywa";
2019-09-19 20:19:41 +02:00
patches = [ ./lldb-procfs.patch ];
2020-01-12 21:22:29 +01:00
nativeBuildInputs = [ cmake python3 which swig lit ];
2019-09-20 01:40:47 +02:00
buildInputs = [
ncurses
zlib
libedit
libxml2
llvm
]
++ stdenv.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
];
2019-09-19 20:19:41 +02:00
CXXFLAGS = "-fno-rtti";
hardeningDisable = [ "format" ];
cmakeFlags = [
"-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic
2019-09-20 01:40:47 +02:00
"-DClang_DIR=${clang-unwrapped}/lib/cmake"
"-DLLVM_EXTERNAL_LIT=${lit}/bin/lit"
2019-09-19 20:19:41 +02:00
];
enableParallelBuilding = true;
postInstall = ''
2019-09-20 01:40:47 +02:00
# man page
2019-09-19 20:19:41 +02:00
mkdir -p $out/share/man/man1
2019-09-20 01:40:47 +02:00
install ../docs/lldb.1 -t $out/share/man/man1/
2019-09-19 20:19:41 +02:00
2019-09-20 01:40:47 +02:00
# Editor support
# vscode:
2019-09-19 20:19:41 +02:00
install -D ../tools/lldb-vscode/package.json $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/package.json
2019-09-20 01:40:47 +02:00
mkdir -p $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
2019-09-19 20:19:41 +02:00
ln -s $out/bin/lldb-vscode $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
'';
meta = with stdenv.lib; {
description = "A next-generation high-performance debugger";
homepage = "https://llvm.org/";
2019-09-20 01:40:47 +02:00
license = licenses.ncsa;
platforms = platforms.all;
2019-09-19 20:19:41 +02:00
};
}