2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, yasm
|
2020-11-19 00:13:47 +00:00
|
|
|
, freetype, fribidi, harfbuzz
|
2020-04-24 23:36:52 +00:00
|
|
|
, fontconfigSupport ? true, fontconfig ? null # fontconfig support
|
|
|
|
, rasterizerSupport ? false # Internal rasterizer
|
|
|
|
, largeTilesSupport ? false # Use larger tiles in the rasterizer
|
|
|
|
, libiconv
|
2024-01-02 11:29:13 +00:00
|
|
|
, darwin
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert fontconfigSupport -> fontconfig != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libass";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "0.17.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/libass/libass/releases/download/${version}/${pname}-${version}.tar.xz";
|
2023-03-15 16:39:30 +00:00
|
|
|
sha256 = "sha256-8NoLv7pHbBauPhz9hiJW0wkVkR96uqGxbOYu5lMZJ4Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlags = [
|
2023-02-02 18:25:31 +00:00
|
|
|
(lib.enableFeature fontconfigSupport "fontconfig")
|
|
|
|
(lib.enableFeature rasterizerSupport "rasterizer")
|
|
|
|
(lib.enableFeature largeTilesSupport "large-tiles")
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config yasm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-19 00:13:47 +00:00
|
|
|
buildInputs = [ freetype fribidi harfbuzz ]
|
2023-02-02 18:25:31 +00:00
|
|
|
++ lib.optional fontconfigSupport fontconfig
|
2024-01-02 11:29:13 +00:00
|
|
|
++ lib.optional stdenv.isDarwin [
|
|
|
|
libiconv
|
|
|
|
darwin.apple_sdk.frameworks.ApplicationServices
|
|
|
|
darwin.apple_sdk.frameworks.CoreFoundation
|
|
|
|
darwin.apple_sdk.frameworks.CoreText
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Portable ASS/SSA subtitle renderer";
|
|
|
|
homepage = "https://github.com/libass/libass";
|
|
|
|
license = licenses.isc;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ codyopel ];
|
|
|
|
};
|
|
|
|
}
|