mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 08:31:59 +00:00
7e9a2c345b
Fixes: * CVE-2016-7969 * CVE-2016-7970 * CVE-2016-7972
54 lines
1.6 KiB
Nix
54 lines
1.6 KiB
Nix
{ stdenv, fetchurl, pkgconfig, yasm
|
|
, freetype, fribidi
|
|
, encaSupport ? true, enca ? null # enca support
|
|
, fontconfigSupport ? true, fontconfig ? null # fontconfig support
|
|
, harfbuzzSupport ? true, harfbuzz ? null # harfbuzz support
|
|
, rasterizerSupport ? false # Internal rasterizer
|
|
, largeTilesSupport ? false # Use larger tiles in the rasterizer
|
|
, libiconv
|
|
}:
|
|
|
|
assert encaSupport -> enca != null;
|
|
assert fontconfigSupport -> fontconfig != null;
|
|
assert harfbuzzSupport -> harfbuzz != null;
|
|
|
|
let
|
|
mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}";
|
|
in
|
|
|
|
with stdenv.lib;
|
|
stdenv.mkDerivation rec {
|
|
name = "libass-${version}";
|
|
version = "0.13.4";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/libass/libass/releases/download/${version}/${name}.tar.xz";
|
|
sha256 = "1dlzkjybnpl2fkvyjq0qblb7qw12cs893bs7zj3rvf8ij342yjnq";
|
|
};
|
|
|
|
configureFlags = [
|
|
(mkFlag encaSupport "enca")
|
|
(mkFlag fontconfigSupport "fontconfig")
|
|
(mkFlag harfbuzzSupport "harfbuzz")
|
|
(mkFlag rasterizerSupport "rasterizer")
|
|
(mkFlag largeTilesSupport "large-tiles")
|
|
];
|
|
|
|
nativeBuildInputs = [ pkgconfig yasm ];
|
|
|
|
buildInputs = [ freetype fribidi ]
|
|
++ optional encaSupport enca
|
|
++ optional fontconfigSupport fontconfig
|
|
++ optional harfbuzzSupport harfbuzz
|
|
++ optional stdenv.isDarwin libiconv;
|
|
|
|
meta = {
|
|
description = "Portable ASS/SSA subtitle renderer";
|
|
homepage = https://github.com/libass/libass;
|
|
license = licenses.isc;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ codyopel urkud ];
|
|
repositories.git = git://github.com/libass/libass.git;
|
|
};
|
|
}
|