lldb: Fix dependency cycle between out and lib outputs (#380775)

This commit is contained in:
Masum Reza
2025-02-11 16:53:22 +05:30
committed by GitHub
@@ -54,9 +54,10 @@ stdenv.mkDerivation (rec {
src = src';
inherit patches;
# LLDB expects to find the path to `bin` relative to `lib` on Darwin. It cant be patched with the location of
# the `lib` output because that would create a cycle between it and the `out` output.
outputs = [ "out" "dev" ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "lib" ];
# There is no `lib` output because some of the files in `$out/lib` depend on files in `$out/bin`.
# For example, `$out/lib/python3.12/site-packages/lldb/lldb-argdumper` is a symlink to `$out/bin/lldb-argdumper`.
# Also, LLDB expects to find the path to `bin` relative to `lib` on Darwin.
outputs = [ "out" "dev" ];
sourceRoot = lib.optional (lib.versionAtLeast release_version "13") "${src.name}/${pname}";
@@ -140,7 +141,7 @@ stdenv.mkDerivation (rec {
'';
postInstall = ''
wrapProgram $out/bin/lldb --prefix PYTHONPATH : $lib/${python3.sitePackages}/
wrapProgram $out/bin/lldb --prefix PYTHONPATH : ''${!outputLib}/${python3.sitePackages}/
# Editor support
# vscode: