about summary refs log tree commit diff
path: root/pkgs/development/compilers/llvm/12/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/llvm/12/default.nix')
-rw-r--r--pkgs/development/compilers/llvm/12/default.nix22
1 files changed, 17 insertions, 5 deletions
diff --git a/pkgs/development/compilers/llvm/12/default.nix b/pkgs/development/compilers/llvm/12/default.nix
index 512a576d6f5d..d7fa0517815c 100644
--- a/pkgs/development/compilers/llvm/12/default.nix
+++ b/pkgs/development/compilers/llvm/12/default.nix
@@ -135,11 +135,23 @@ let
       inherit (libraries) libunwind;
     };
 
-    lldb = callPackage ./lldb {
-      inherit llvm_meta;
-      inherit (darwin) libobjc bootstrap_cmds;
-      inherit (darwin.apple_sdk.libs) xpc;
-      inherit (darwin.apple_sdk.frameworks) Foundation Carbon Cocoa;
+    lldb = callPackage ../common/lldb.nix {
+      src = fetch "lldb" "0g3pj1m3chafavpr35r9fynm85y2hdyla6klj0h28khxs2613i78";
+      patches =
+        let
+          resourceDirPatch = callPackage ({ runCommand, libclang }: (runCommand "resource-dir.patch"
+            {
+              clangLibDir = "${libclang.lib}/lib";
+            } ''
+            substitute '${./lldb/resource-dir.patch}' "$out" --subst-var clangLibDir
+          '')) { };
+        in
+        [
+          ./lldb/procfs.patch
+          resourceDirPatch
+          ./lldb/gnu-install-dirs.patch
+        ];
+      inherit llvm_meta release_version;
     };
 
     # Below, is the LLVM bootstrapping logic. It handles building a