libass: enable CoreText backend on darwin

libass has multiple font rendering backends which are autodetected by
the configure script.  On macOS, there is a CoreText backend, but it
was disabled in Nix's build because the relevant native frameworks
weren't visible to the configure script.  Fix that.
This commit is contained in:
comex 2023-11-11 11:29:20 -08:00
parent daad29f97e
commit 406de7fdc3
2 changed files with 9 additions and 1 deletions

View File

@ -519,6 +519,8 @@ The module update takes care of the new config syntax and the data itself (user
- The Home Assistant module now offers support for installing custom components and lovelace modules. Available at [`services.home-assistant.customComponents`](#opt-services.home-assistant.customComponents) and [`services.home-assistant.customLovelaceModules`](#opt-services.home-assistant.customLovelaceModules).
- `libass` now uses the native CoreText backend on Darwin, which may fix subtitle rendering issues with `mpv`, `ffmpeg`, etc.
## Nixpkgs internals {#sec-release-23.11-nixpkgs-internals}
- The use of `sourceRoot = "source";`, `sourceRoot = "source/subdir";`, and similar lines in package derivations using the default `unpackPhase` is deprecated as it requires `unpackPhase` to always produce a directory named "source". Use `sourceRoot = src.name`, `sourceRoot = "${src.name}/subdir";`, or `setSourceRoot = "sourceRoot=$(echo */subdir)";` or similar instead.

View File

@ -4,6 +4,7 @@
, rasterizerSupport ? false # Internal rasterizer
, largeTilesSupport ? false # Use larger tiles in the rasterizer
, libiconv
, darwin
}:
assert fontconfigSupport -> fontconfig != null;
@ -29,7 +30,12 @@ stdenv.mkDerivation rec {
buildInputs = [ freetype fribidi harfbuzz ]
++ lib.optional fontconfigSupport fontconfig
++ lib.optional stdenv.isDarwin libiconv;
++ lib.optional stdenv.isDarwin [
libiconv
darwin.apple_sdk.frameworks.ApplicationServices
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.CoreText
];
meta = with lib; {
description = "Portable ASS/SSA subtitle renderer";