llvmPackages_{12,13,14,15,16,17,18,19,20,git}.libunwind: move pre and post patch hooks
This commit is contained in:
committed by
Alyssa Ross
parent
b512c59df3
commit
0d1beffa7d
@@ -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 { })
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user