From 0d1beffa7d094181016afd59eac70617cfe298b4 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Sun, 30 Mar 2025 19:55:50 -0700 Subject: [PATCH] llvmPackages_{12,13,14,15,16,17,18,19,20,git}.libunwind: move pre and post patch hooks --- .../llvm/common/libunwind/default.nix | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/pkgs/development/compilers/llvm/common/libunwind/default.nix b/pkgs/development/compilers/llvm/common/libunwind/default.nix index a414113fca53..5d14a26fa891 100644 --- a/pkgs/development/compilers/llvm/common/libunwind/default.nix +++ b/pkgs/development/compilers/llvm/common/libunwind/default.nix @@ -30,21 +30,6 @@ stdenv.mkDerivation ( finalAttrs: let hasPatches = builtins.length finalAttrs.patches > 0; - - prePatch = - lib.optionalString - (lib.versionAtLeast release_version "15" && (hasPatches || lib.versionOlder release_version "18")) - '' - cd ../libunwind - chmod -R u+w . - ''; - - postPatch = - lib.optionalString - (lib.versionAtLeast release_version "15" && (hasPatches || lib.versionOlder release_version "18")) - '' - cd ../runtimes - ''; in { pname = "libunwind"; @@ -108,6 +93,21 @@ stdenv.mkDerivation ( ] ++ devExtraCmakeFlags; + prePatch = + lib.optionalString + (lib.versionAtLeast release_version "15" && (hasPatches || lib.versionOlder release_version "18")) + '' + cd ../libunwind + chmod -R u+w . + ''; + + postPatch = + lib.optionalString + (lib.versionAtLeast release_version "15" && (hasPatches || lib.versionOlder release_version "18")) + '' + cd ../runtimes + ''; + meta = llvm_meta // { # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library"; @@ -121,6 +121,4 @@ stdenv.mkDerivation ( }; } // (if (lib.versionAtLeast release_version "15") then { inherit postInstall; } else { }) - // (if prePatch != "" then { inherit prePatch; } else { }) - // (if postPatch != "" then { inherit postPatch; } else { }) )