From 580f5b27e19f3fe3eede7da067ed95265fb442da Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Sun, 30 Mar 2025 19:56:14 -0700 Subject: [PATCH] llvmPackages_{12,13,14,15,16,17,18,19,20,git}.libunwind: move post install --- .../llvm/common/libunwind/default.nix | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/pkgs/development/compilers/llvm/common/libunwind/default.nix b/pkgs/development/compilers/llvm/common/libunwind/default.nix index 5d14a26fa891..0695d8f2be5b 100644 --- a/pkgs/development/compilers/llvm/common/libunwind/default.nix +++ b/pkgs/development/compilers/llvm/common/libunwind/default.nix @@ -15,17 +15,6 @@ devExtraCmakeFlags ? [ ], getVersionFile, }: -let - postInstall = - lib.optionalString (enableShared && !stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isWindows) - '' - # libcxxabi wants to link to libunwind_shared.so (?). - ln -s $out/lib/libunwind.so $out/lib/libunwind_shared.so - '' - + lib.optionalString (enableShared && stdenv.hostPlatform.isWindows) '' - ln -s $out/lib/libunwind.dll.a $out/lib/libunwind_shared.dll.a - ''; -in stdenv.mkDerivation ( finalAttrs: let @@ -108,6 +97,16 @@ stdenv.mkDerivation ( cd ../runtimes ''; + postInstall = + lib.optionalString (enableShared && !stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isWindows) + '' + # libcxxabi wants to link to libunwind_shared.so (?). + ln -s $out/lib/libunwind.so $out/lib/libunwind_shared.so + '' + + lib.optionalString (enableShared && stdenv.hostPlatform.isWindows) '' + ln -s $out/lib/libunwind.dll.a $out/lib/libunwind_shared.dll.a + ''; + 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"; @@ -120,5 +119,4 @@ stdenv.mkDerivation ( ''; }; } - // (if (lib.versionAtLeast release_version "15") then { inherit postInstall; } else { }) )