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
|
2020-04-24 23:36:52 +00:00
|
|
|
, x11Support? !stdenv.isDarwin, libXft
|
2021-12-06 16:07:01 +00:00
|
|
|
, withIntrospection ? (stdenv.buildPlatform == stdenv.hostPlatform)
|
|
|
|
, gobject-introspection
|
|
|
|
, withDocs ? (stdenv.buildPlatform == stdenv.hostPlatform)
|
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-03-30 09:31:56 +00:00
|
|
|
version = "1.50.6";
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
outputs = [ "bin" "out" "dev" ]
|
|
|
|
++ lib.optionals withDocs [ "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-03-30 09:31:56 +00:00
|
|
|
sha256 = "qZi882iBw6wgSV1AvOswT06qkXW9KWfIVlZDTL2v6Go=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
strictDeps = !withIntrospection;
|
|
|
|
|
|
|
|
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
|
|
|
] ++ lib.optionals withIntrospection [
|
2021-04-05 15:23:46 +00:00
|
|
|
gobject-introspection
|
2021-12-06 16:07:01 +00:00
|
|
|
] ++ lib.optionals withDocs [
|
2021-04-05 15:23:46 +00:00
|
|
|
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
|
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 = [
|
2021-07-14 22:03:04 +00:00
|
|
|
"-Dgtk_doc=${lib.boolToString withDocs}"
|
2021-12-06 16:07:01 +00:00
|
|
|
"-Dintrospection=${if withIntrospection then "enabled" else "disabled"}"
|
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 ];
|
|
|
|
};
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
doCheck = false; # test-font: FAIL
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
postFixup = lib.optionalString withDocs ''
|
|
|
|
# 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";
|
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;
|
|
|
|
};
|
|
|
|
}
|