From 1a148262f409cd898d8afb4923368e01744ac6a8 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Tue, 4 Mar 2025 21:20:14 -0800 Subject: [PATCH] llvmPackages_{12,13,14,15,16,17,18,19,20,git}.libunwind: move patches out of common --- pkgs/development/compilers/llvm/common/default.nix | 3 --- .../development/compilers/llvm/common/libunwind/default.nix | 6 +++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/compilers/llvm/common/default.nix b/pkgs/development/compilers/llvm/common/default.nix index 118722da1e44..39d55c293219 100644 --- a/pkgs/development/compilers/llvm/common/default.nix +++ b/pkgs/development/compilers/llvm/common/default.nix @@ -1086,9 +1086,6 @@ let ); libunwind = callPackage ./libunwind { - patches = lib.optional (lib.versionOlder metadata.release_version "17") ( - metadata.getVersionFile "libunwind/gnu-install-dirs.patch" - ); stdenv = overrideCC stdenv buildLlvmTools.clangWithLibcAndBasicRt; }; diff --git a/pkgs/development/compilers/llvm/common/libunwind/default.nix b/pkgs/development/compilers/llvm/common/libunwind/default.nix index 4891878c6a99..e912092353e1 100644 --- a/pkgs/development/compilers/llvm/common/libunwind/default.nix +++ b/pkgs/development/compilers/llvm/common/libunwind/default.nix @@ -1,7 +1,6 @@ { lib , stdenv , release_version -, patches ? [] , src ? null , llvm_meta , version @@ -13,6 +12,7 @@ , libcxx , enableShared ? !stdenv.hostPlatform.isStatic , devExtraCmakeFlags ? [] +, getVersionFile }: let pname = "libunwind"; @@ -33,6 +33,10 @@ let cp -r ${monorepoSrc}/runtimes "$out" '') else src; + patches = lib.optional (lib.versionOlder release_version "17") ( + getVersionFile "libunwind/gnu-install-dirs.patch" + ); + hasPatches = builtins.length patches > 0; prePatch = lib.optionalString (lib.versionAtLeast release_version "15" && (hasPatches || lib.versionOlder release_version "18")) ''