Merge pull request #266907 from comex/libass-coretext

libass: enable CoreText backend on darwin
This commit is contained in:
Emily Trau 2023-11-13 18:34:52 +11:00 committed by GitHub
commit b3460d2cb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -531,6 +531,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";