2021-04-05 15:23:46 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, pkg-config
|
|
|
|
, cairo
|
|
|
|
, harfbuzz
|
|
|
|
, libintl
|
|
|
|
, libthai
|
|
|
|
, darwin
|
|
|
|
, fribidi
|
2021-05-20 23:08:51 +00:00
|
|
|
, gnome
|
2021-04-05 15:23:46 +00:00
|
|
|
, gi-docgen
|
|
|
|
, makeFontsConf
|
|
|
|
, freefont_ttf
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, glib
|
2021-12-06 16:07:01 +00:00
|
|
|
, python3
|
2024-09-26 11:04:55 +00:00
|
|
|
, x11Support? !stdenv.hostPlatform.isDarwin, libXft
|
2023-10-19 13:55:26 +00:00
|
|
|
, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
|
2023-03-04 12:14:45 +00:00
|
|
|
, buildPackages, gobject-introspection
|
2024-02-29 20:09:43 +00:00
|
|
|
, testers
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "pango";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "1.52.2";
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
outputs = [ "bin" "out" "dev" ] ++ lib.optional withIntrospection "devdoc";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2024-02-29 20:09:43 +00:00
|
|
|
url = with finalAttrs; "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-0Adq/gEIKBS4U97smfk0ns5fLOg5CLjlj/c2tB94qWs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
depsBuildBuild = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson ninja
|
|
|
|
glib # for glib-mkenum
|
2021-04-05 15:23:46 +00:00
|
|
|
pkg-config
|
2021-12-06 16:07:01 +00:00
|
|
|
python3
|
2023-03-04 12:14:45 +00:00
|
|
|
] ++ lib.optionals withIntrospection [
|
|
|
|
gi-docgen
|
|
|
|
gobject-introspection
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
|
|
|
fribidi
|
2020-11-12 09:05:59 +00:00
|
|
|
libthai
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
|
2020-04-24 23:36:52 +00:00
|
|
|
ApplicationServices
|
|
|
|
Carbon
|
|
|
|
CoreGraphics
|
|
|
|
CoreText
|
|
|
|
]);
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cairo
|
|
|
|
glib
|
|
|
|
libintl
|
|
|
|
harfbuzz
|
|
|
|
] ++ lib.optionals x11Support [
|
|
|
|
libXft
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
mesonFlags = [
|
2023-03-04 12:14:45 +00:00
|
|
|
(lib.mesonBool "gtk_doc" withIntrospection)
|
|
|
|
(lib.mesonEnable "introspection" withIntrospection)
|
|
|
|
(lib.mesonEnable "xft" x11Support)
|
2021-04-05 15:23:46 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Fontconfig error: Cannot load default config file
|
|
|
|
FONTCONFIG_FILE = makeFontsConf {
|
|
|
|
fontDirectories = [ freefont_ttf ];
|
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +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"
|
|
|
|
'';
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
doCheck = false; # test-font: FAIL
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
postFixup = ''
|
2022-03-30 09:31:56 +00:00
|
|
|
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
|
|
|
|
moveToOutput "share/doc" "$devdoc"
|
2021-04-05 15:23:46 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
passthru = {
|
2021-05-20 23:08:51 +00:00
|
|
|
updateScript = gnome.updateScript {
|
2024-02-29 20:09:43 +00:00
|
|
|
packageName = finalAttrs.pname;
|
2022-10-21 18:38:19 +00:00
|
|
|
# 1.90 is alpha for API 2.
|
2023-10-09 19:29:22 +00:00
|
|
|
freeze = "1.90.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-02-29 20:09:43 +00:00
|
|
|
tests = {
|
|
|
|
pkg-config = testers.hasPkgConfigModules {
|
|
|
|
package = finalAttrs.finalPackage;
|
|
|
|
};
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Library for laying out and rendering of text, with an emphasis on internationalization";
|
2020-04-24 23:36:52 +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;
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
maintainers = with maintainers; [ raskin ] ++ teams.gnome.members;
|
2023-03-04 12:14:45 +00:00
|
|
|
platforms = platforms.unix;
|
2023-08-10 07:59:29 +00:00
|
|
|
|
|
|
|
pkgConfigModules = [
|
|
|
|
"pango"
|
|
|
|
"pangocairo"
|
|
|
|
"pangofc"
|
|
|
|
"pangoft2"
|
|
|
|
"pangoot"
|
|
|
|
"pangoxft"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-02-29 20:09:43 +00:00
|
|
|
})
|