about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/llvm/7/lldb.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/llvm/7/lldb.nix')
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/lldb.nix21
1 files changed, 13 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/lldb.nix b/nixpkgs/pkgs/development/compilers/llvm/7/lldb.nix
index f58871f1d7cd..1b2dff2c76cf 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/7/lldb.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/lldb.nix
@@ -9,6 +9,7 @@
 , libxml2
 , llvm
 , clang-unwrapped
+, perl
 , python
 , version
 , darwin
@@ -19,6 +20,11 @@ stdenv.mkDerivation {
 
   src = fetch "lldb" "0klsscg1sczc4nw2l53xggi969k361cng2sjjrfp3bv4g5x14s4v";
 
+  nativeBuildInputs = [ cmake perl python which swig ];
+  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 ];
+
+
   postPatch = ''
     # Fix up various paths that assume llvm and clang are installed in the same place
     sed -i 's,".*ClangConfig.cmake","${clang-unwrapped}/lib/cmake/clang/ClangConfig.cmake",' \
@@ -30,22 +36,21 @@ stdenv.mkDerivation {
     sed -i -e 's,message(SEND_ERROR "Cannot find debugserver on system."),,' \
            -e 's,string(STRIP ''${XCODE_DEV_DIR} XCODE_DEV_DIR),,' \
            tools/debugserver/source/CMakeLists.txt
+
+    # Fix /usr/bin references for sandboxed builds.
+    patchShebangs scripts
   '';
 
-  nativeBuildInputs = [ cmake python which swig ];
-  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 darwin.cf-private ];
+  cmakeFlags = [
+    "-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic
+    "-DSKIP_DEBUGSERVER=ON"
+  ];
 
   CXXFLAGS = "-fno-rtti";
   hardeningDisable = [ "format" ];
 
   NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-I${libxml2.dev}/include/libxml2";
 
-  cmakeFlags = [
-    "-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic
-    "-DSKIP_DEBUGSERVER=ON"
-  ];
-
   enableParallelBuilding = true;
 
   postInstall = ''