about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/llvm/16/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/llvm/16/default.nix')
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/16/default.nix17
1 files changed, 9 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/default.nix b/nixpkgs/pkgs/development/compilers/llvm/16/default.nix
index 94d0e7d30b58..9dbe65ed68da 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/16/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/16/default.nix
@@ -192,12 +192,13 @@ in let
       '') { };
       patches =
         let
-          resourceDirPatch = callPackage ({ runCommand, libclang }: (runCommand "resource-dir.patch"
-            {
-              clangLibDir = "${libclang.lib}/lib";
-            } ''
-            substitute '${./lldb/resource-dir.patch}' "$out" --subst-var clangLibDir
-          '')) { };
+          resourceDirPatch = callPackage
+            ({ substituteAll, libclang }: substituteAll
+              {
+                src = ./lldb/resource-dir.patch;
+                clangLibDir = "${libclang.lib}/lib";
+              })
+            { };
         in
         [
           # FIXME: do we need this? ./procfs.patch
@@ -218,7 +219,7 @@ in let
             && !stdenv.targetPlatform.isAarch64
             && (lib.versionOlder darwin.apple_sdk.sdk.version "11.0")
         ) ./lldb/cpu_subtype_arm64e_replacement.patch;
-      inherit llvm_meta release_version;
+      inherit llvm_meta;
     };
 
     # Below, is the LLVM bootstrapping logic. It handles building a
@@ -228,7 +229,7 @@ in let
     # doesn’t support like LLVM. Probably we should move to some other
     # file.
 
-    bintools-unwrapped = callPackage ./bintools {};
+    bintools-unwrapped = callPackage ../common/bintools.nix { };
 
     bintoolsNoLibc = wrapBintoolsWith {
       bintools = tools.bintools-unwrapped;