22, stdenv
33, substituteAll
44, fetchurl
5+ , fetchpatch
56, pkg-config
67, gettext
78, graphene
6465
6566stdenv . mkDerivation rec {
6667 pname = "gtk4" ;
67- version = "4.10.4 " ;
68+ version = "4.12.0 " ;
6869
6970 outputs = [ "out" "dev" ] ++ lib . optionals x11Support [ "devdoc" ] ;
7071 outputBin = "dev" ;
@@ -76,12 +77,19 @@ stdenv.mkDerivation rec {
7677
7778 src = fetchurl {
7879 url = "mirror://gnome/sources/gtk/${ lib . versions . majorMinor version } /gtk-${ version } .tar.xz" ;
79- sha256 = "dyVABILgaF4oJl4ibGKEf05zz8qem0FqxYOCB/U3eiQ =" ;
80+ sha256 = "ptEIKfQFsa/Atl4qlkLAQSah0bY40Rxtl0JtpPhPH28 =" ;
8081 } ;
8182
8283 patches = [
8384 # https://github.com/NixOS/nixpkgs/pull/218143#issuecomment-1501059486
8485 ./patches/4.0-fix-darwin-build.patch
86+
87+ # Fixes "undefined symbol: gtk_printer_option_set"
88+ # https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6250
89+ ( fetchpatch {
90+ url = "https://gitlab.gnome.org/GNOME/gtk/-/commit/4d7277f72c8f4915f237e36982ffd7dfba524b15.patch" ;
91+ sha256 = "nLNvrfrgF/Ssr2XUQDV8Qbszw5OUA4CnkZ6okrSlzOc=" ;
92+ } )
8593 ] ;
8694
8795 depsBuildBuild = [
@@ -163,7 +171,7 @@ stdenv.mkDerivation rec {
163171
164172 mesonFlags = [
165173 # ../docs/tools/shooter.c:4:10: fatal error: 'cairo-xlib.h' file not found
166- "-Dgtk_doc =${ lib . boolToString x11Support } "
174+ "-Ddocumentation =${ lib . boolToString x11Support } "
167175 "-Dbuild-tests=false"
168176 "-Dtracker=${ if trackerSupport then "enabled" else "disabled" } "
169177 "-Dbroadway-backend=${ lib . boolToString broadwaySupport } "
@@ -192,6 +200,7 @@ stdenv.mkDerivation rec {
192200 postPatch = ''
193201 files=(
194202 build-aux/meson/gen-demo-header.py
203+ build-aux/meson/gen-visibility-macros.py
195204 demos/gtk-demo/geninclude.py
196205 gdk/broadway/gen-c-array.py
197206 gdk/gen-gdk-gresources-xml.py
0 commit comments