tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
dropbox-cli: 2020.03.04 -> 2023.09.06
éclairevoyant
2 years ago
3439e8c1
464e69ef
+5
-204
2 changed files
expand all
collapse all
unified
split
pkgs
applications
networking
dropbox
cli.nix
nautilus-43.patch
+5
-9
pkgs/applications/networking/dropbox/cli.nix
···
5
, fetchurl
6
, python3
7
, dropbox
8
-
, gtk3
9
, gnome
10
, gdk-pixbuf
11
, gobject-introspection
12
}:
13
14
let
15
-
version = "2020.03.04";
16
dropboxd = "${dropbox}/bin/dropbox";
17
in
18
stdenv.mkDerivation {
···
23
24
src = fetchurl {
25
url = "https://linux.dropbox.com/packages/nautilus-dropbox-${version}.tar.bz2";
26
-
sha256 = "1jjc835n2j61d23kvygdb4n4jsrw33r9mbwxrm4fqin6x01l2w7k";
27
};
28
29
strictDeps = true;
30
31
patches = [
32
-
# Fix extension for Nautilus 43
33
-
# https://github.com/dropbox/nautilus-dropbox/pull/105
34
-
./nautilus-43.patch
35
-
36
(substituteAll {
37
src = ./fix-cli-paths.patch;
38
inherit dropboxd;
···
54
55
buildInputs = [
56
python3
57
-
gtk3
58
gnome.nautilus
59
];
60
61
configureFlags = [
62
-
"--with-nautilus-extension-dir=${placeholder "nautilusExtension"}/lib/nautilus/extensions-3.0"
63
];
64
65
makeFlags = [
···
5
, fetchurl
6
, python3
7
, dropbox
8
+
, gtk4
9
, gnome
10
, gdk-pixbuf
11
, gobject-introspection
12
}:
13
14
let
15
+
version = "2023.09.06";
16
dropboxd = "${dropbox}/bin/dropbox";
17
in
18
stdenv.mkDerivation {
···
23
24
src = fetchurl {
25
url = "https://linux.dropbox.com/packages/nautilus-dropbox-${version}.tar.bz2";
26
+
hash = "sha256-kZMwj8Fn8Hf58C57wE025TlmiSs5TaKMGEzvb2QjgSw=";
27
};
28
29
strictDeps = true;
30
31
patches = [
0
0
0
0
32
(substituteAll {
33
src = ./fix-cli-paths.patch;
34
inherit dropboxd;
···
50
51
buildInputs = [
52
python3
53
+
gtk4
54
gnome.nautilus
55
];
56
57
configureFlags = [
58
+
"--with-nautilus-extension-dir=${placeholder "nautilusExtension"}/lib/nautilus/extension-4"
59
];
60
61
makeFlags = [
-195
pkgs/applications/networking/dropbox/nautilus-43.patch
···
1
-
diff --git a/configure.ac b/configure.ac
2
-
index 025289c..42b49fa 100644
3
-
--- a/configure.ac
4
-
+++ b/configure.ac
5
-
@@ -12,7 +12,7 @@ AM_CONFIG_HEADER(config.h)
6
-
#AC_PROG_INTLTOOL([0.29])
7
-
8
-
# Dependency checks
9
-
-NAUTILUS_REQUIRED=2.16.0
10
-
+NAUTILUS_REQUIRED=43.rc
11
-
GLIB_REQUIRED=2.14.0
12
-
13
-
# Used programs
14
-
@@ -26,8 +26,11 @@ if test "x$HAVE_PKGCONFIG" = "xno"; then
15
-
AC_MSG_ERROR(you need to have pkgconfig installed !)
16
-
fi
17
-
18
-
-PKG_CHECK_MODULES(NAUTILUS, libnautilus-extension >= $NAUTILUS_REQUIRED)
19
-
+PKG_CHECK_MODULES(NAUTILUS, libnautilus-extension-4 >= $NAUTILUS_REQUIRED)
20
-
PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED)
21
-
+PKG_CHECK_MODULES(GTK, gtk4 >= 4.6.0)
22
-
+
23
-
+AC_SUBST(GTK_CFLAGS)
24
-
25
-
AC_PATH_PROG([PYTHON3], [python3])
26
-
27
-
@@ -84,10 +87,10 @@ AC_MSG_CHECKING([for nautilus extension directory])
28
-
if test -n "$with_nautilus_extension_dir"; then
29
-
NAUTILUS_EXTENSION_DIR=$with_nautilus_extension_dir
30
-
else
31
-
- NAUTILUS_EXTENSION_DIR=`$PKG_CONFIG --variable=extensiondir libnautilus-extension`
32
-
+ NAUTILUS_EXTENSION_DIR=`$PKG_CONFIG --variable=extensiondir libnautilus-extension-4`
33
-
fi
34
-
if test -z "$NAUTILUS_EXTENSION_DIR"; then
35
-
- NAUTILUS_EXTENSION_DIR='${exec_prefix}/lib/nautilus/extension-1.0'
36
-
+ NAUTILUS_EXTENSION_DIR='${exec_prefix}/lib/nautilus/extension-4'
37
-
fi
38
-
39
-
AC_MSG_RESULT([${NAUTILUS_EXTENSION_DIR}])
40
-
diff --git a/src/Makefile.am b/src/Makefile.am
41
-
index 15d6687..c521ec5 100644
42
-
--- a/src/Makefile.am
43
-
+++ b/src/Makefile.am
44
-
@@ -13,6 +13,7 @@ libnautilus_dropbox_la_CFLAGS = \
45
-
$(WARN_CFLAGS) \
46
-
$(DISABLE_DEPRECATED_CFLAGS) \
47
-
$(NAUTILUS_CFLAGS) \
48
-
+ $(GTK_CFLAGS) \
49
-
$(GLIB_CFLAGS)
50
-
51
-
if DEBUG
52
-
diff --git a/src/dropbox.c b/src/dropbox.c
53
-
index 0d59559..8162aa9 100644
54
-
--- a/src/dropbox.c
55
-
+++ b/src/dropbox.c
56
-
@@ -27,9 +27,6 @@
57
-
58
-
#include <glib-object.h>
59
-
60
-
-#include <gdk/gdk.h>
61
-
-#include <gtk/gtk.h>
62
-
-
63
-
#include "nautilus-dropbox.h"
64
-
65
-
static GType type_list[1];
66
-
@@ -41,9 +38,6 @@ nautilus_module_initialize (GTypeModule *module) {
67
-
nautilus_dropbox_register_type (module);
68
-
type_list[0] = NAUTILUS_TYPE_DROPBOX;
69
-
70
-
- dropbox_use_nautilus_submenu_workaround
71
-
- = (NAUTILUS_VERSION_MAJOR < 2 ||
72
-
- (NAUTILUS_VERSION_MAJOR == 2 && NAUTILUS_VERSION_MINOR <= 22));
73
-
dropbox_use_operation_in_progress_workaround = TRUE;
74
-
}
75
-
76
-
diff --git a/src/nautilus-dropbox.c b/src/nautilus-dropbox.c
77
-
index c75ccbf..b9c10b4 100644
78
-
--- a/src/nautilus-dropbox.c
79
-
+++ b/src/nautilus-dropbox.c
80
-
@@ -37,9 +37,7 @@
81
-
#include <glib-object.h>
82
-
#include <gtk/gtk.h>
83
-
84
-
-#include <libnautilus-extension/nautilus-extension-types.h>
85
-
-#include <libnautilus-extension/nautilus-menu-provider.h>
86
-
-#include <libnautilus-extension/nautilus-info-provider.h>
87
-
+#include <nautilus-extension.h>
88
-
89
-
#include "g-util.h"
90
-
#include "dropbox-command-client.h"
91
-
@@ -49,7 +47,7 @@
92
-
static char *emblems[] = {"dropbox-uptodate", "dropbox-syncing", "dropbox-unsyncable"};
93
-
gchar *DEFAULT_EMBLEM_PATHS[2] = { EMBLEMDIR , NULL };
94
-
95
-
-gboolean dropbox_use_nautilus_submenu_workaround;
96
-
+
97
-
gboolean dropbox_use_operation_in_progress_workaround;
98
-
99
-
static GType dropbox_type = 0;
100
-
@@ -630,13 +628,6 @@ nautilus_dropbox_parse_menu(gchar **options,
101
-
g_object_set_property (G_OBJECT(item), "sensitive", &sensitive);
102
-
}
103
-
104
-
- /* taken from nautilus-file-repairer (http://repairer.kldp.net/):
105
-
- * this code is a workaround for a bug of nautilus
106
-
- * See: http://bugzilla.gnome.org/show_bug.cgi?id=508878 */
107
-
- if (dropbox_use_nautilus_submenu_workaround) {
108
-
- toret = g_list_append(toret, item);
109
-
- }
110
-
-
111
-
g_object_unref(item);
112
-
g_string_free(new_action_string, TRUE);
113
-
ret++;
114
-
@@ -661,7 +652,6 @@ get_file_items_callback(GHashTable *response, gpointer ud)
115
-
116
-
static GList *
117
-
nautilus_dropbox_get_file_items(NautilusMenuProvider *provider,
118
-
- GtkWidget *window,
119
-
GList *files)
120
-
{
121
-
/*
122
-
@@ -778,14 +768,13 @@ add_emblem_paths(GHashTable* emblem_paths_response)
123
-
124
-
gchar **emblem_paths_list;
125
-
int i;
126
-
-
127
-
- GtkIconTheme *theme = gtk_icon_theme_get_default();
128
-
+ GtkIconTheme *theme = gtk_icon_theme_get_for_display (gdk_display_get_default ());
129
-
130
-
if (emblem_paths_response &&
131
-
(emblem_paths_list = g_hash_table_lookup(emblem_paths_response, "path"))) {
132
-
for (i = 0; emblem_paths_list[i] != NULL; i++) {
133
-
if (emblem_paths_list[i][0])
134
-
- gtk_icon_theme_append_search_path(theme, emblem_paths_list[i]);
135
-
+ gtk_icon_theme_add_search_path(theme, emblem_paths_list[i]);
136
-
}
137
-
}
138
-
g_hash_table_unref(emblem_paths_response);
139
-
@@ -804,15 +793,14 @@ remove_emblem_paths(GHashTable* emblem_paths_response)
140
-
goto exit;
141
-
142
-
// We need to remove the old paths.
143
-
- GtkIconTheme * icon_theme = gtk_icon_theme_get_default();
144
-
gchar ** paths;
145
-
- gint path_count;
146
-
+ GtkIconTheme *theme = gtk_icon_theme_get_for_display (gdk_display_get_default ());
147
-
148
-
- gtk_icon_theme_get_search_path(icon_theme, &paths, &path_count);
149
-
+ paths = gtk_icon_theme_get_search_path(theme);
150
-
151
-
gint i, j, out = 0;
152
-
gboolean found = FALSE;
153
-
- for (i = 0; i < path_count; i++) {
154
-
+ for (i = 0; paths[i] != NULL; i++) {
155
-
gboolean keep = TRUE;
156
-
for (j = 0; emblem_paths_list[j] != NULL; j++) {
157
-
if (emblem_paths_list[j][0]) {
158
-
@@ -834,7 +822,7 @@ remove_emblem_paths(GHashTable* emblem_paths_response)
159
-
accomodate the changes */
160
-
if (found) {
161
-
paths[out] = NULL; /* Clear the last one */
162
-
- gtk_icon_theme_set_search_path(icon_theme, (const gchar **)paths, out);
163
-
+ gtk_icon_theme_set_search_path(theme, (const gchar **)paths);
164
-
}
165
-
166
-
g_strfreev(paths);
167
-
@@ -888,13 +876,13 @@ on_disconnect(NautilusDropbox *cvs) {
168
-
169
-
170
-
static void
171
-
-nautilus_dropbox_menu_provider_iface_init (NautilusMenuProviderIface *iface) {
172
-
+nautilus_dropbox_menu_provider_iface_init (NautilusMenuProviderInterface *iface) {
173
-
iface->get_file_items = nautilus_dropbox_get_file_items;
174
-
return;
175
-
}
176
-
177
-
static void
178
-
-nautilus_dropbox_info_provider_iface_init (NautilusInfoProviderIface *iface) {
179
-
+nautilus_dropbox_info_provider_iface_init (NautilusInfoProviderInterface *iface) {
180
-
iface->update_file_info = nautilus_dropbox_update_file_info;
181
-
iface->cancel_update = nautilus_dropbox_cancel_update;
182
-
return;
183
-
diff --git a/src/nautilus-dropbox.h b/src/nautilus-dropbox.h
184
-
index 65734be..44faa27 100644
185
-
--- a/src/nautilus-dropbox.h
186
-
+++ b/src/nautilus-dropbox.h
187
-
@@ -27,7 +27,7 @@
188
-
#include <glib.h>
189
-
#include <glib-object.h>
190
-
191
-
-#include <libnautilus-extension/nautilus-info-provider.h>
192
-
+#include <nautilus-extension.h>
193
-
194
-
#include "dropbox-command-client.h"
195
-
#include "nautilus-dropbox-hooks.h"
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0