nixpkgs/pkgs/development/libraries/libass/default.nix
Jonathan Ringer 9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00

50 lines
1.4 KiB
Nix

{ stdenv, fetchurl, pkg-config, yasm
, freetype, fribidi, harfbuzz
, encaSupport ? true, enca ? null # enca support
, fontconfigSupport ? true, fontconfig ? null # fontconfig support
, rasterizerSupport ? false # Internal rasterizer
, largeTilesSupport ? false # Use larger tiles in the rasterizer
, libiconv
}:
assert encaSupport -> enca != null;
assert fontconfigSupport -> fontconfig != null;
let
mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}";
in
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "libass";
version = "0.15.0";
src = fetchurl {
url = "https://github.com/libass/libass/releases/download/${version}/${pname}-${version}.tar.xz";
sha256 = "0cz8v6kh3f2j5rdjrra2z0h715fa16vjm7kambvqx9hak86262cz";
};
configureFlags = [
(mkFlag encaSupport "enca")
(mkFlag fontconfigSupport "fontconfig")
(mkFlag rasterizerSupport "rasterizer")
(mkFlag largeTilesSupport "large-tiles")
];
nativeBuildInputs = [ pkg-config yasm ];
buildInputs = [ freetype fribidi harfbuzz ]
++ optional encaSupport enca
++ optional fontconfigSupport fontconfig
++ 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";
};
}