diff options
author | Colin <colin@uninsane.org> | 2023-08-07 07:29:03 +0000 |
---|---|---|
committer | Colin <colin@uninsane.org> | 2023-08-07 09:10:14 +0000 |
commit | 5ee69670071f583bdffe2718dc46763fa1698f92 (patch) | |
tree | d190d32c89dceab40e0d97e5a05818283662b21e /pkgs/development/libraries/gtk/3.x.nix | |
parent | af8989fe73fc9d3865eb65c3603661f26233d79d (diff) | |
download | nixpkgs-5ee69670071f583bdffe2718dc46763fa1698f92.tar nixpkgs-5ee69670071f583bdffe2718dc46763fa1698f92.tar.gz nixpkgs-5ee69670071f583bdffe2718dc46763fa1698f92.tar.bz2 nixpkgs-5ee69670071f583bdffe2718dc46763fa1698f92.tar.lz nixpkgs-5ee69670071f583bdffe2718dc46763fa1698f92.tar.xz nixpkgs-5ee69670071f583bdffe2718dc46763fa1698f92.tar.zst nixpkgs-5ee69670071f583bdffe2718dc46763fa1698f92.zip |
gtk3: compile schemas even when cross compiling
without this applications won't locate gtk3's schemas even if they're on XDG_DATA_DIRS. this patch solves runtime errors of the form: ``` Settings schema 'org.gtk.Settings.FileChooser' is not installed ```
Diffstat (limited to 'pkgs/development/libraries/gtk/3.x.nix')
-rw-r--r-- | pkgs/development/libraries/gtk/3.x.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/development/libraries/gtk/3.x.nix b/pkgs/development/libraries/gtk/3.x.nix index a527faf5a8b..792f305a83b 100644 --- a/pkgs/development/libraries/gtk/3.x.nix +++ b/pkgs/development/libraries/gtk/3.x.nix @@ -24,6 +24,7 @@ , gobject-introspection , buildPackages , withIntrospection ? stdenv.hostPlatform.emulatorAvailable buildPackages +, compileSchemas ? stdenv.hostPlatform.emulatorAvailable buildPackages , fribidi , xorg , libepoxy @@ -110,7 +111,7 @@ stdenv.mkDerivation (finalAttrs: { gtk-doc # For xmllint libxml2 - ] ++ lib.optionals (withIntrospection && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + ] ++ lib.optionals ((withIntrospection || compileSchemas) && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ mesonEmulatorHook ] ++ lib.optionals waylandSupport [ wayland-scanner @@ -183,6 +184,10 @@ stdenv.mkDerivation (finalAttrs: { substituteInPlace meson.build \ --replace "x11_enabled = false" "" + # this conditional gates the installation of share/gsettings-schemas/.../glib-2.0/schemas/gschemas.compiled. + substituteInPlace meson.build \ + --replace 'if not meson.is_cross_build()' 'if ${lib.boolToString compileSchemas}' + files=( build-aux/meson/post-install.py demos/gtk-demo/geninclude.py |