3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/libass/default.nix
volth 46420bbaa3 treewide: name -> pname (easy cases) (#66585)
treewide replacement of

stdenv.mkDerivation rec {
  name = "*-${version}";
  version = "*";

to pname
2019-08-15 13:41:18 +01:00

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 {
pname = "libass";
version = "0.14.0";
src = fetchurl {
url = "https://github.com/libass/libass/releases/download/${version}/${pname}-${version}.tar.xz";
sha256 = "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8";
};
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 ];
repositories.git = git://github.com/libass/libass.git;
};
}