commit
d06efd2107
22
pkgs/development/libraries/gtk+/2.0-darwin-x11.patch
Normal file
22
pkgs/development/libraries/gtk+/2.0-darwin-x11.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- a/gdk/x11/gdkapplaunchcontext-x11.c
|
||||
+++ b/gdk/x11/gdkapplaunchcontext-x11.c
|
||||
@@ -26,7 +26,6 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include <glib.h>
|
||||
-#include <gio/gdesktopappinfo.h>
|
||||
|
||||
#include "gdkx.h"
|
||||
#include "gdkapplaunchcontext.h"
|
||||
@@ -363,10 +362,7 @@
|
||||
else
|
||||
workspace_str = NULL;
|
||||
|
||||
- if (G_IS_DESKTOP_APP_INFO (info))
|
||||
- application_id = g_desktop_app_info_get_filename (G_DESKTOP_APP_INFO (info));
|
||||
- else
|
||||
- application_id = NULL;
|
||||
+ application_id = NULL;
|
||||
|
||||
startup_id = g_strdup_printf ("%s-%lu-%s-%s-%d_TIME%lu",
|
||||
g_get_prgname (),
|
@ -32,10 +32,13 @@ stdenv.mkDerivation rec {
|
||||
patches = [
|
||||
./2.0-immodules.cache.patch
|
||||
./gtk2-theme-paths.patch
|
||||
] ++ optional stdenv.isDarwin (fetchpatch {
|
||||
url = https://bug557780.bugzilla-attachments.gnome.org/attachment.cgi?id=306776;
|
||||
sha256 = "0sp8f1r5c4j2nlnbqgv7s7nxa4cfwigvm033hvhb1ld652pjag4r";
|
||||
});
|
||||
] ++ optionals stdenv.isDarwin [
|
||||
(fetchpatch {
|
||||
url = https://bug557780.bugzilla-attachments.gnome.org/attachment.cgi?id=306776;
|
||||
sha256 = "0sp8f1r5c4j2nlnbqgv7s7nxa4cfwigvm033hvhb1ld652pjag4r";
|
||||
})
|
||||
./2.0-darwin-x11.patch
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with xorg;
|
||||
[ glib cairo pango gdk_pixbuf atk ]
|
||||
|
28
pkgs/development/libraries/gtk+/3.0-darwin-x11.patch
Normal file
28
pkgs/development/libraries/gtk+/3.0-darwin-x11.patch
Normal file
@ -0,0 +1,28 @@
|
||||
--- a/gdk/x11/gdkapplaunchcontext-x11.c
|
||||
+++ b/gdk/x11/gdkapplaunchcontext-x11.c
|
||||
@@ -27,7 +27,9 @@
|
||||
#include "gdkprivate-x11.h"
|
||||
|
||||
#include <glib.h>
|
||||
+#if defined(HAVE_GIO_UNIX) && !defined(__APPLE__)
|
||||
#include <gio/gdesktopappinfo.h>
|
||||
+#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
@@ -352,10 +354,15 @@
|
||||
else
|
||||
workspace_str = NULL;
|
||||
|
||||
+#if defined(HAVE_GIO_UNIX) && !defined(__APPLE__)
|
||||
if (G_IS_DESKTOP_APP_INFO (info))
|
||||
application_id = g_desktop_app_info_get_filename (G_DESKTOP_APP_INFO (info));
|
||||
else
|
||||
application_id = NULL;
|
||||
+#else
|
||||
+ application_id = NULL;
|
||||
+#warning Please add support for creating AppInfo from id for your OS
|
||||
+#endif
|
||||
|
||||
startup_id = g_strdup_printf ("%s-%lu-%s-%s-%d_TIME%lu",
|
||||
g_get_prgname (),
|
@ -45,6 +45,11 @@ stdenv.mkDerivation rec {
|
||||
url = https://gitlab.gnome.org/GNOME/gtk/commit/e3a1593a0984cc0156ec1892a46af8f256a64878.patch;
|
||||
sha256 = "0akvp1r8xlzf5amk9gmk7b5sabr1wbmg3ak15rppsid7nf9f5dqf";
|
||||
})
|
||||
] ++ optionals stdenv.isDarwin [
|
||||
# X11 module requires <gio/gdesktopappinfo.h> which is not installed on Darwin
|
||||
# let’s drop that dependency in similar way to how other parts of the library do it
|
||||
# e.g. https://gitlab.gnome.org/GNOME/gtk/blob/3.24.4/gtk/gtk-launch.c#L31-33
|
||||
./3.0-darwin-x11.patch
|
||||
];
|
||||
|
||||
buildInputs = [ libxkbcommon epoxy json-glib isocodes ]
|
||||
|
@ -17,6 +17,8 @@ buildPythonPackage rec {
|
||||
# Fix warning spam
|
||||
./pygobject-2.28.6-set_qdata.patch
|
||||
./pygobject-2.28.6-gio-types-2.32.patch
|
||||
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
||||
./pygobject-2.0-fix-darwin.patch
|
||||
];
|
||||
|
||||
configureFlags = [ "--disable-introspection" ];
|
||||
|
@ -0,0 +1,88 @@
|
||||
--- a/gio/unix-types.defs
|
||||
+++ b/gio/unix-types.defs
|
||||
@@ -7,18 +7,6 @@
|
||||
(gtype-id "G_TYPE_UNIX_CONNECTION")
|
||||
)
|
||||
|
||||
-(define-object DesktopAppInfo
|
||||
- (docstring
|
||||
- "DesktopAppInfo(desktop_id) -> gio.unix.DesktopAppInfo\n\n"
|
||||
- "gio.Unix.DesktopAppInfo is an implementation of gio.AppInfo\n"
|
||||
- "based on desktop files."
|
||||
- )
|
||||
- (in-module "giounix")
|
||||
- (parent "GObject")
|
||||
- (c-name "GDesktopAppInfo")
|
||||
- (gtype-id "G_TYPE_DESKTOP_APP_INFO")
|
||||
-)
|
||||
-
|
||||
(define-object FDMessage
|
||||
(in-module "giounix")
|
||||
(parent "GSocketControlMessage")
|
||||
--- a/gio/unix.defs
|
||||
+++ b/gio/unix.defs
|
||||
@@ -32,54 +32,6 @@
|
||||
|
||||
|
||||
|
||||
-;; From gdesktopappinfo.h
|
||||
-
|
||||
-(define-function desktop_app_info_get_type
|
||||
- (c-name "g_desktop_app_info_get_type")
|
||||
- (return-type "GType")
|
||||
-)
|
||||
-
|
||||
-(define-function desktop_app_info_new_from_filename
|
||||
- (c-name "g_desktop_app_info_new_from_filename")
|
||||
- (return-type "GDesktopAppInfo*")
|
||||
- (parameters
|
||||
- '("const-char*" "filename")
|
||||
- )
|
||||
-)
|
||||
-
|
||||
-(define-function g_desktop_app_info_new_from_keyfile
|
||||
- (c-name "g_desktop_app_info_new_from_keyfile")
|
||||
- (return-type "GDesktopAppInfo*")
|
||||
- (parameters
|
||||
- '("GKeyFile*" "key_file")
|
||||
- )
|
||||
-)
|
||||
-
|
||||
-(define-function desktop_app_info_new
|
||||
- (c-name "g_desktop_app_info_new")
|
||||
- (is-constructor-of "GDesktopAppInfo")
|
||||
- (return-type "GDesktopAppInfo*")
|
||||
- (parameters
|
||||
- '("const-char*" "desktop_id")
|
||||
- )
|
||||
-)
|
||||
-
|
||||
-(define-method get_is_hidden
|
||||
- (of-object "GDesktopAppInfo")
|
||||
- (c-name "g_desktop_app_info_get_is_hidden")
|
||||
- (return-type "gboolean")
|
||||
-)
|
||||
-
|
||||
-(define-function desktop_app_info_set_desktop_env
|
||||
- (c-name "g_desktop_app_info_set_desktop_env")
|
||||
- (return-type "none")
|
||||
- (parameters
|
||||
- '("const-char*" "desktop_env")
|
||||
- )
|
||||
-)
|
||||
-
|
||||
-
|
||||
-
|
||||
;; From gunixfdmessage.h
|
||||
|
||||
(define-function g_unix_fd_message_get_type
|
||||
--- a/gio/unix.override
|
||||
+++ b/gio/unix.override
|
||||
@@ -24,7 +24,6 @@
|
||||
#define NO_IMPORT_PYGOBJECT
|
||||
#include <pygobject.h>
|
||||
#include <gio/gio.h>
|
||||
-#include <gio/gdesktopappinfo.h>
|
||||
#include <gio/gunixinputstream.h>
|
||||
#include <gio/gunixmounts.h>
|
||||
#include <gio/gunixoutputstream.h>
|
Loading…
Reference in New Issue
Block a user