From e603d2941a498dde20a2a321e322babe620b0a34 Mon Sep 17 00:00:00 2001 From: Dima Date: Wed, 23 Oct 2019 11:41:56 +0200 Subject: [PATCH 1/4] pango: 1.43.0 -> 1.44.7 --- pkgs/development/libraries/pango/default.nix | 23 ++++--------------- .../python-modules/pygtk/default.nix | 6 +++-- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/pkgs/development/libraries/pango/default.nix b/pkgs/development/libraries/pango/default.nix index 9f1e7d5c2fcf..ecb0f16c72c5 100644 --- a/pkgs/development/libraries/pango/default.nix +++ b/pkgs/development/libraries/pango/default.nix @@ -9,13 +9,13 @@ with stdenv.lib; let pname = "pango"; - version = "1.43.0"; + version = "1.44.7"; in stdenv.mkDerivation rec { name = "${pname}-${version}"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz"; - sha256 = "1lnxldmv1a12dq5h0dlq5jyzl4w75k76dp8cn360x2ijlm9w5h6j"; + sha256 = "07qvxa2sk90chp1l12han6vxvy098mc37sdqcznyywyv2g6bd9b6"; }; # FIXME: docs fail on darwin @@ -26,31 +26,18 @@ in stdenv.mkDerivation rec { pkgconfig gobject-introspection gtk-doc docbook_xsl docbook_xml_dtd_43 ]; buildInputs = [ - harfbuzz fribidi + fribidi ] ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices Carbon CoreGraphics CoreText ]); - propagatedBuildInputs = [ cairo glib libintl ] ++ + propagatedBuildInputs = [ cairo glib libintl harfbuzz ] ++ optional x11Support libXft; - patches = [ - (fetchpatch { - # Add gobject-2 to .pc file - url = "https://gitlab.gnome.org/GNOME/pango/commit/546f4c242d6f4fe312de3b7c918a848e5172e18d.patch"; - sha256 = "1cqhy4xbwx3ad7z5d1ks7smf038b9as8c6qy84rml44h0fgiq4m2"; - }) - (fetchpatch { - # Fixes CVE-2019-1010238 - url = "https://gitlab.gnome.org/GNOME/pango/commit/490f8979a260c16b1df055eab386345da18a2d54.diff"; - sha256 = "1s0qclbaknkx3dkc3n6mlmx3fnhlr2pkncqjkywprpvahmmypr7k"; - }) - ]; - mesonFlags = [ - "-Denable_docs=${if stdenv.isDarwin then "false" else "true"}" + "-Dgtk_doc=${if stdenv.isDarwin then "false" else "true"}" ]; enableParallelBuilding = true; diff --git a/pkgs/development/python-modules/pygtk/default.nix b/pkgs/development/python-modules/pygtk/default.nix index 09ccb5c3d95f..d482ba79a274 100644 --- a/pkgs/development/python-modules/pygtk/default.nix +++ b/pkgs/development/python-modules/pygtk/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, python, pkgconfig, gtk2, pygobject2, pycairo +{ stdenv, fetchurl, python, pkgconfig, gtk2, pygobject2, pycairo, pango , buildPythonPackage, libglade ? null, isPy3k }: buildPythonPackage rec { @@ -13,7 +13,9 @@ buildPythonPackage rec { }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = stdenv.lib.optional (libglade != null) libglade; + buildInputs = [ + pango + ] ++ stdenv.lib.optional (libglade != null) libglade; propagatedBuildInputs = [ gtk2 pygobject2 pycairo ]; From 1a33f39d910b943c793e9cb1a76046af83b0b673 Mon Sep 17 00:00:00 2001 From: Dima Date: Fri, 29 Nov 2019 01:46:10 +0100 Subject: [PATCH 2/4] pygtk: compatibility with pango 1.44 * Removes an unused binding that prevents compilation with newer pango * Adds a patch to fix a memory leak --- pkgs/development/python-modules/pygtk/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pygtk/default.nix b/pkgs/development/python-modules/pygtk/default.nix index d482ba79a274..4779f76aed46 100644 --- a/pkgs/development/python-modules/pygtk/default.nix +++ b/pkgs/development/python-modules/pygtk/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, python, pkgconfig, gtk2, pygobject2, pycairo, pango +{ stdenv, fetchurl, fetchpatch, python, pkgconfig, gtk2, pygobject2, pycairo, pango , buildPythonPackage, libglade ? null, isPy3k }: buildPythonPackage rec { @@ -12,6 +12,18 @@ buildPythonPackage rec { sha256 = "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"; }; + patches = [ + # https://bugzilla.gnome.org/show_bug.cgi?id=660216 - fixes some memory leaks + (fetchpatch { + url = "https://gitlab.gnome.org/Archive/pygtk/commit/eca72baa5616fbe4dbebea43c7e5940847dc5ab8.diff"; + sha256 = "031px4w5cshcx1sns430sdbr2i007b9zyb2carb3z65nzr77dpdd"; + }) + (fetchpatch { + url = "https://gitlab.gnome.org/Archive/pygtk/commit/4aaa48eb80c6802aec6d03e5695d2a0ff20e0fc2.patch"; + sha256 = "0z8cg7nr3qki8gg8alasdzzyxcihfjlxn518glq5ajglk3q5pzsn"; + }) + ]; + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ pango From fea6b5f3e0f73fef9e8844e18f8b71300aa32649 Mon Sep 17 00:00:00 2001 From: Dima Date: Tue, 19 Nov 2019 20:55:52 +0100 Subject: [PATCH 3/4] cmake: patching for harfbuzz location a patch to cmake to correctly locate harfbuzz: https://gitlab.kitware.com/cmake/cmake/issues/19531, needed for more recent pango. --- pkgs/development/tools/build-managers/cmake/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 3cd724b1a311..37a44f15e9ce 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, pkgconfig +{ stdenv, lib, fetchurl, fetchpatch, pkgconfig , bzip2, curl, expat, libarchive, xz, zlib, libuv, rhash , buildPackages # darwin attributes @@ -36,6 +36,13 @@ stdenv.mkDerivation rec { # Derived from https://github.com/libuv/libuv/commit/1a5d4f08238dd532c3718e210078de1186a5920d ./libuv-application-services.patch + + # Fix for harfbuzz with pango versions > 1.43. + # Should be removed with cmake >= 3.16 + (fetchpatch { + url = "https://gitlab.kitware.com/cmake/cmake/commit/effafca77eacbb4988006b1f3f4d9154df6c33f8.diff"; + sha256 = "0vxam5kka1dffygp1nd0g21ib9qk8kds8iprbfga2gimzyrlfmfr"; + }) ] ++ lib.optional stdenv.isCygwin ./3.2.2-cygwin.patch; outputs = [ "out" ]; From c25d4abc21e7bd50025068156e7dd36ba1ab0b89 Mon Sep 17 00:00:00 2001 From: Dima Date: Mon, 2 Dec 2019 02:25:07 +0100 Subject: [PATCH 4/4] release-notes: adding pango font loading deprecation --- nixos/doc/manual/release-notes/rl-2003.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-2003.xml b/nixos/doc/manual/release-notes/rl-2003.xml index 2a5064c71b0f..c5b8b1254f78 100644 --- a/nixos/doc/manual/release-notes/rl-2003.xml +++ b/nixos/doc/manual/release-notes/rl-2003.xml @@ -198,6 +198,14 @@ The buildRustCrate infrastructure now produces lib outputs in addition to the out output. This has led to drastically reduced closed sizes for some rust crates since development dependencies are now in the lib output. + + + + Pango was upgraded to 1.44, which no longer uses freetype for font loading. This means that type1 + and bitmap fonts are no longer supported in applications relying on Pango for font rendering + (notably, GTK application). See + upstream issue for more information. +