mpv: restore non‐obsolete Swift library path hack

Turns out that it’s not obsolete; it avoids a runtime dependency
on the Swift wrapper because of some weird stuff we do. This should
probably be fixed in the Swift packaging, but let’s fix the closure
size again for now and add a comment for that.

This reverts commit 84d64ade98.

Fixes: #356861
(cherry picked from commit 8d9ac2131d)
This commit is contained in:
Emily 2024-11-18 09:27:16 +00:00 committed by github-actions[bot]
parent fa68170402
commit 0eefcac2f3

View File

@ -129,6 +129,12 @@ stdenv.mkDerivation (finalAttrs: {
'' ''
]; ];
# Ensure we reference 'lib' (not 'out') of Swift.
# TODO: Remove this once the Swift wrapper doesnt include these.
preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
export SWIFT_LIB_DYNAMIC="${lib.getLib swift.swift}/lib/swift/macosx"
'';
mesonFlags = [ mesonFlags = [
(lib.mesonOption "default_library" "shared") (lib.mesonOption "default_library" "shared")
(lib.mesonBool "libmpv" true) (lib.mesonBool "libmpv" true)