From 27a71a19ed6748177c073fe8dfad95849e9f5058 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Sat, 3 Aug 2019 11:09:41 -0400 Subject: [PATCH] gtk3: defines for debugging, disable cast checks Because we're using plain buildtype these have to be passed manually. See: https://gitlab.gnome.org/GNOME/gtk/blob/3.24.10/meson.build#L59 With autotools the mapping for the the options to the defines was: yes: G_ENABLE_DEBUG G_ENABLE_CONSISTENCY_CHECKS minimum: G_ENABLE_DEBUG G_DISABLE_CAST_CHECKS no: G_DISABLE_CAST_CHECKS G_DISABLE_ASSERT G_DISABLE_CHECKS So we're passing the exact ones that would've been used for minimum. Additionally it isn't a good idea to pass the equivalents used for "no" as it eliminates G_ENABLE_DEBUG which disables pre-condition checks and assertions. The actual option only existed to serve people who needed a specific build of GTK for very specific environments. And now they are much better served with meson's plain buildtype and figuring out what to pass themselves. --- pkgs/development/libraries/gtk+/3.x.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/libraries/gtk+/3.x.nix b/pkgs/development/libraries/gtk+/3.x.nix index 94b745794f1..40be17fcac7 100644 --- a/pkgs/development/libraries/gtk+/3.x.nix +++ b/pkgs/development/libraries/gtk+/3.x.nix @@ -77,6 +77,13 @@ stdenv.mkDerivation rec { "-Dtests=false" ]; + # These are the defines that'd you'd get with --enable-debug=minimum (default). + # See: https://developer.gnome.org/gtk3/stable/gtk-building.html#extra-configuration-options + NIX_CFLAGS_COMPILE = [ + "-DG_ENABLE_DEBUG" + "-DG_DISABLE_CAST_CHECKS" + ]; + postPatch = '' files=( build-aux/meson/post-install.py