nixpkgs/pkgs/development/libraries/pango/default.nix
Bobby Rong 93e0c42c77 pango: 1.50.14 → 1.51.0
https://gitlab.gnome.org/GNOME/pango/-/compare/1.50.14...1.51.1

Possible wrong tag:

https://gitlab.gnome.org/GNOME/pango/-/issues/760

Also dropped unneeded substituteInPlace (not related to this bump):

cc9072ad21

Some usage of cairo DWrite are introduced here (which needs 1.17.8), but they
are for Windows so far.

Changelog-reviewed-by: Bobby Rong <rjl931189261@126.com>
Changelog-reviewed-by: Jan Tojnar <jtojnar@gmail.com>
2023-11-21 08:41:57 +01:00

130 lines
3.0 KiB
Nix

{ lib
, stdenv
, fetchurl
, pkg-config
, cairo
, harfbuzz
, libintl
, libthai
, darwin
, fribidi
, gnome
, gi-docgen
, makeFontsConf
, freefont_ttf
, meson
, ninja
, glib
, python3
, x11Support? !stdenv.isDarwin, libXft
, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
, buildPackages, gobject-introspection
}:
stdenv.mkDerivation rec {
pname = "pango";
version = "1.51.0";
outputs = [ "bin" "out" "dev" ] ++ lib.optional withIntrospection "devdoc";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "dO/BCa5vkDu+avd+qirGCUuO4kWi4j8TKnqPCGLRqfU=";
};
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
meson ninja
glib # for glib-mkenum
pkg-config
python3
] ++ lib.optionals withIntrospection [
gi-docgen
gobject-introspection
];
buildInputs = [
fribidi
libthai
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
ApplicationServices
Carbon
CoreGraphics
CoreText
]);
propagatedBuildInputs = [
cairo
glib
libintl
harfbuzz
] ++ lib.optionals x11Support [
libXft
];
mesonFlags = [
(lib.mesonBool "gtk_doc" withIntrospection)
(lib.mesonEnable "introspection" withIntrospection)
(lib.mesonEnable "xft" x11Support)
];
# Fontconfig error: Cannot load default config file
FONTCONFIG_FILE = makeFontsConf {
fontDirectories = [ freefont_ttf ];
};
# Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)
# it should be a build-time dep for build
# TODO: send upstream
postPatch = ''
substituteInPlace docs/meson.build \
--replace "'gi-docgen', req" "'gi-docgen', native:true, req"
'';
doCheck = false; # test-font: FAIL
postFixup = ''
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
moveToOutput "share/doc" "$devdoc"
'';
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
versionPolicy = "odd-unstable";
# 1.90 is alpha for API 2.
freeze = "1.90.0";
};
};
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 ] ++ teams.gnome.members;
platforms = platforms.unix;
pkgConfigModules = [
"pango"
"pangocairo"
"pangofc"
"pangoft2"
"pangoot"
"pangoxft"
];
};
}