diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-11-21 16:12:21 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-11-21 16:12:48 +0100 |
commit | 048a4cd441a59cbf89defb18bb45c9f0b4429b35 (patch) | |
tree | f8f5850ff05521ab82d65745894714a8796cbfb6 /pkgs/development/libraries/gtk/4.x.nix | |
parent | 030c5028b07afcedce7c5956015c629486cc79d9 (diff) | |
parent | 4c2d05dd6435d449a3651a6dd314d9411b5f8146 (diff) | |
download | nixpkgs-rootfs.tar nixpkgs-rootfs.tar.gz nixpkgs-rootfs.tar.bz2 nixpkgs-rootfs.tar.lz nixpkgs-rootfs.tar.xz nixpkgs-rootfs.tar.zst nixpkgs-rootfs.zip |
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'pkgs/development/libraries/gtk/4.x.nix')
-rw-r--r-- | pkgs/development/libraries/gtk/4.x.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/development/libraries/gtk/4.x.nix b/pkgs/development/libraries/gtk/4.x.nix index b7e8c13ccca..0503ac199f9 100644 --- a/pkgs/development/libraries/gtk/4.x.nix +++ b/pkgs/development/libraries/gtk/4.x.nix @@ -1,5 +1,6 @@ { lib , stdenv +, buildPackages , substituteAll , fetchurl , pkg-config @@ -7,6 +8,7 @@ , graphene , gi-docgen , meson +, mesonEmulatorHook , ninja , python3 , makeWrapper @@ -45,6 +47,7 @@ , wayland-scanner , xineramaSupport ? stdenv.isLinux , cupsSupport ? stdenv.isLinux +, compileSchemas ? stdenv.hostPlatform.emulatorAvailable buildPackages , cups , AppKit , Cocoa @@ -99,6 +102,8 @@ stdenv.mkDerivation rec { sassc gi-docgen libxml2 # for xmllint + ] ++ lib.optionals (compileSchemas && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ] ++ lib.optionals waylandSupport [ wayland-scanner ] ++ setupHooks; @@ -190,6 +195,10 @@ stdenv.mkDerivation rec { }; postPatch = '' + # 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/gen-demo-header.py demos/gtk-demo/geninclude.py |