mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 20:53:48 +00:00
80 lines
2.2 KiB
Nix
80 lines
2.2 KiB
Nix
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, cairo, harfbuzz
|
|
, libintl, libthai, gobject-introspection, darwin, fribidi, gnome3
|
|
, gtk-doc, docbook_xsl, docbook_xml_dtd_43, makeFontsConf, freefont_ttf
|
|
, meson, ninja, glib
|
|
, x11Support? !stdenv.isDarwin, libXft
|
|
}:
|
|
|
|
with lib;
|
|
|
|
let
|
|
pname = "pango";
|
|
version = "1.47.0";
|
|
in stdenv.mkDerivation rec {
|
|
name = "${pname}-${version}";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${name}.tar.xz";
|
|
sha256 = "0ry3j9n0lvdfmjwi2w7wa4gkalnip56kghqq6bh8hcf45xjvh3bk";
|
|
};
|
|
|
|
# FIXME: docs fail on darwin
|
|
outputs = [ "bin" "dev" "out" ] ++ optional (!stdenv.isDarwin) "devdoc";
|
|
|
|
nativeBuildInputs = [
|
|
meson ninja
|
|
glib # for glib-mkenum
|
|
pkg-config gobject-introspection gtk-doc docbook_xsl docbook_xml_dtd_43
|
|
];
|
|
buildInputs = [
|
|
fribidi
|
|
libthai
|
|
] ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
|
ApplicationServices
|
|
Carbon
|
|
CoreGraphics
|
|
CoreText
|
|
]);
|
|
propagatedBuildInputs = [ cairo glib libintl harfbuzz ] ++
|
|
optional x11Support libXft;
|
|
|
|
mesonFlags = [
|
|
"-Dgtk_doc=${if stdenv.isDarwin then "false" else "true"}"
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
"-Dxft=disabled" # only works with x11
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
# Fontconfig error: Cannot load default config file
|
|
FONTCONFIG_FILE = makeFontsConf {
|
|
fontDirectories = [ freefont_ttf ];
|
|
};
|
|
|
|
doCheck = false; # /layout/valid-1.markup: FAIL
|
|
|
|
passthru = {
|
|
updateScript = gnome3.updateScript {
|
|
packageName = pname;
|
|
};
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "A library for laying out and rendering of text, with an emphasis on internationalization";
|
|
|
|
longDescription = ''
|
|
Pango is a library for laying out and rendering of text, with an
|
|
emphasis on internationalization. Pango can be used anywhere
|
|
that text layout is needed, though most of the work on Pango so
|
|
far has been done in the context of the GTK widget toolkit.
|
|
Pango forms the core of text and font handling for GTK.
|
|
'';
|
|
|
|
homepage = "https://www.pango.org/";
|
|
license = licenses.lgpl2Plus;
|
|
|
|
maintainers = with maintainers; [ raskin ];
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
};
|
|
}
|