mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 11:50:06 +00:00
57 lines
1.1 KiB
Nix
57 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
pkg-config,
|
|
yasm,
|
|
freetype,
|
|
fribidi,
|
|
harfbuzz,
|
|
fontconfigSupport ? true,
|
|
fontconfig ? null, # fontconfig support
|
|
largeTilesSupport ? false, # Use larger tiles in the rasterizer
|
|
libiconv,
|
|
}:
|
|
|
|
assert fontconfigSupport -> fontconfig != null;
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "libass";
|
|
version = "0.17.4";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/libass/libass/releases/download/${finalAttrs.version}/libass-${finalAttrs.version}.tar.xz";
|
|
hash = "sha256-ePEXm4ONAl6cJuj+8z+AkvZWEURP+hv8DPrGozURoFo=";
|
|
};
|
|
|
|
outputs = [
|
|
"out"
|
|
"dev"
|
|
];
|
|
|
|
configureFlags = [
|
|
(lib.enableFeature fontconfigSupport "fontconfig")
|
|
(lib.enableFeature largeTilesSupport "large-tiles")
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
yasm
|
|
];
|
|
|
|
buildInputs = [
|
|
freetype
|
|
fribidi
|
|
harfbuzz
|
|
]
|
|
++ lib.optional fontconfigSupport fontconfig;
|
|
|
|
meta = {
|
|
description = "Portable ASS/SSA subtitle renderer";
|
|
homepage = "https://github.com/libass/libass";
|
|
license = lib.licenses.isc;
|
|
platforms = lib.platforms.unix;
|
|
maintainers = [ ];
|
|
};
|
|
})
|