2024-05-13 21:24:10 +00:00
|
|
|
{ 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, testers }:
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "pango";
|
|
|
|
version = "1.51.2";
|
|
|
|
|
|
|
|
outputs = [ "bin" "out" "dev" ] ++ lib.optional withIntrospection "devdoc";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2024-05-13 21:24:10 +00:00
|
|
|
url = with finalAttrs;
|
|
|
|
"mirror://gnome/sources/${pname}/${
|
|
|
|
lib.versions.majorMinor version
|
|
|
|
}/${pname}-${version}.tar.xz";
|
2024-05-02 00:46:19 +00:00
|
|
|
sha256 = "sha256-PbpAfytfwRfhkvMCXwocyO3B/ZuTSxxXiyuXNCE5QVo=";
|
|
|
|
};
|
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
depsBuildBuild = [ pkg-config ];
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-05-13 21:24:10 +00:00
|
|
|
meson
|
|
|
|
ninja
|
2024-05-02 00:46:19 +00:00
|
|
|
glib # for glib-mkenum
|
|
|
|
pkg-config
|
|
|
|
python3
|
2024-05-13 21:24:10 +00:00
|
|
|
] ++ lib.optionals withIntrospection [ gi-docgen gobject-introspection ];
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
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 ];
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
(lib.mesonBool "gtk_doc" withIntrospection)
|
|
|
|
(lib.mesonEnable "introspection" withIntrospection)
|
|
|
|
(lib.mesonEnable "xft" x11Support)
|
|
|
|
];
|
|
|
|
|
|
|
|
# Fontconfig error: Cannot load default config file
|
2024-05-13 21:24:10 +00:00
|
|
|
FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ freefont_ttf ]; };
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
# 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 = finalAttrs.pname;
|
|
|
|
# 1.90 is alpha for API 2.
|
|
|
|
freeze = "1.90.0";
|
|
|
|
};
|
|
|
|
tests = {
|
2024-05-13 21:24:10 +00:00
|
|
|
pkg-config =
|
|
|
|
testers.hasPkgConfigModules { package = finalAttrs.finalPackage; };
|
2024-05-02 00:46:19 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-05-13 21:24:10 +00:00
|
|
|
description =
|
|
|
|
"A library for laying out and rendering of text, with an emphasis on internationalization";
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
2024-05-13 19:05:39 +00:00
|
|
|
# maintainers = with maintainers; [ raskin ] ++ teams.gnome.members;
|
2024-05-02 00:46:19 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
pkgConfigModules =
|
|
|
|
[ "pango" "pangocairo" "pangofc" "pangoft2" "pangoot" "pangoxft" ];
|
2024-05-02 00:46:19 +00:00
|
|
|
};
|
|
|
|
})
|