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
|
|
|
|
, gobject-introspection
|
2022-08-12 12:06:08 +00:00
|
|
|
, x11Support? !stdenv.isDarwin, libXft
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "pango";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "1.50.12";
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
outputs = [ "bin" "out" "dev" "devdoc" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-04-05 15:23:46 +00:00
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2022-12-17 10:02:37 +00:00
|
|
|
sha256 = "yu+W0nu+eSpr6ScnxzRo2DKxPaV8gHHvebnfae4Fj+M=";
|
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
|
|
|
|
gobject-introspection
|
|
|
|
gi-docgen
|
2021-12-06 16:07:01 +00:00
|
|
|
python3
|
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
|
2022-08-12 12:06:08 +00:00
|
|
|
gobject-introspection
|
2021-04-05 15:23:46 +00:00
|
|
|
] ++ lib.optionals stdenv.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 = [
|
2022-08-12 12:06:08 +00:00
|
|
|
"-Dgtk_doc=true"
|
2021-04-05 15:23:46 +00:00
|
|
|
] ++ lib.optionals (!x11Support) [
|
|
|
|
"-Dxft=disabled" # only works with x11
|
|
|
|
];
|
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 meson.build \
|
|
|
|
--replace "dependency('gi-docgen', ver" "dependency('gi-docgen', native:true, ver"
|
|
|
|
|
|
|
|
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 {
|
2020-04-24 23:36:52 +00:00
|
|
|
packageName = pname;
|
2021-05-20 23:08:51 +00:00
|
|
|
versionPolicy = "odd-unstable";
|
2022-10-21 18:38:19 +00:00
|
|
|
# 1.90 is alpha for API 2.
|
|
|
|
freeze = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
maintainers = with maintainers; [ raskin ] ++ teams.gnome.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
};
|
|
|
|
}
|