From 464e69ef243a9846111bac8ba4b7e962c133fdaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=A9clairevoyant?= <848000+eclairevoyant@users.noreply.github.com> Date: Fri, 20 Oct 2023 00:17:23 -0400 Subject: [PATCH 1/3] dropbox: 111.3.447 -> 185.4.6054 --- pkgs/applications/networking/dropbox/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/dropbox/default.nix b/pkgs/applications/networking/dropbox/default.nix index cf2edf767316..fd48bc86a9b8 100644 --- a/pkgs/applications/networking/dropbox/default.nix +++ b/pkgs/applications/networking/dropbox/default.nix @@ -7,7 +7,7 @@ assert lib.elem stdenv.hostPlatform.system platforms; # Dropbox client to bootstrap installation. # The client is self-updating, so the actual version may be newer. let - version = "111.3.447"; + version = "185.4.6054"; arch = { x86_64-linux = "x86_64"; @@ -84,7 +84,7 @@ buildFHSEnv { description = "Online stored folders (daemon version)"; homepage = "http://www.dropbox.com/"; license = licenses.unfree; - maintainers = with maintainers; [ ttuegel ]; + maintainers = with maintainers; [ eclairevoyant ttuegel ]; platforms = [ "i686-linux" "x86_64-linux" ]; mainProgram = "dropbox"; }; From 3439e8c114c6ab90e9040d10bd42dcb6b7e60109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=A9clairevoyant?= <848000+eclairevoyant@users.noreply.github.com> Date: Fri, 20 Oct 2023 00:34:30 -0400 Subject: [PATCH 2/3] dropbox-cli: 2020.03.04 -> 2023.09.06 --- pkgs/applications/networking/dropbox/cli.nix | 14 +- .../networking/dropbox/nautilus-43.patch | 195 ------------------ 2 files changed, 5 insertions(+), 204 deletions(-) delete mode 100644 pkgs/applications/networking/dropbox/nautilus-43.patch diff --git a/pkgs/applications/networking/dropbox/cli.nix b/pkgs/applications/networking/dropbox/cli.nix index c6b0baa9d3f6..460780461a84 100644 --- a/pkgs/applications/networking/dropbox/cli.nix +++ b/pkgs/applications/networking/dropbox/cli.nix @@ -5,14 +5,14 @@ , fetchurl , python3 , dropbox -, gtk3 +, gtk4 , gnome , gdk-pixbuf , gobject-introspection }: let - version = "2020.03.04"; + version = "2023.09.06"; dropboxd = "${dropbox}/bin/dropbox"; in stdenv.mkDerivation { @@ -23,16 +23,12 @@ stdenv.mkDerivation { src = fetchurl { url = "https://linux.dropbox.com/packages/nautilus-dropbox-${version}.tar.bz2"; - sha256 = "1jjc835n2j61d23kvygdb4n4jsrw33r9mbwxrm4fqin6x01l2w7k"; + hash = "sha256-kZMwj8Fn8Hf58C57wE025TlmiSs5TaKMGEzvb2QjgSw="; }; strictDeps = true; patches = [ - # Fix extension for Nautilus 43 - # https://github.com/dropbox/nautilus-dropbox/pull/105 - ./nautilus-43.patch - (substituteAll { src = ./fix-cli-paths.patch; inherit dropboxd; @@ -54,12 +50,12 @@ stdenv.mkDerivation { buildInputs = [ python3 - gtk3 + gtk4 gnome.nautilus ]; configureFlags = [ - "--with-nautilus-extension-dir=${placeholder "nautilusExtension"}/lib/nautilus/extensions-3.0" + "--with-nautilus-extension-dir=${placeholder "nautilusExtension"}/lib/nautilus/extension-4" ]; makeFlags = [ diff --git a/pkgs/applications/networking/dropbox/nautilus-43.patch b/pkgs/applications/networking/dropbox/nautilus-43.patch deleted file mode 100644 index b4b557843197..000000000000 --- a/pkgs/applications/networking/dropbox/nautilus-43.patch +++ /dev/null @@ -1,195 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index 025289c..42b49fa 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -12,7 +12,7 @@ AM_CONFIG_HEADER(config.h) - #AC_PROG_INTLTOOL([0.29]) - - # Dependency checks --NAUTILUS_REQUIRED=2.16.0 -+NAUTILUS_REQUIRED=43.rc - GLIB_REQUIRED=2.14.0 - - # Used programs -@@ -26,8 +26,11 @@ if test "x$HAVE_PKGCONFIG" = "xno"; then - AC_MSG_ERROR(you need to have pkgconfig installed !) - fi - --PKG_CHECK_MODULES(NAUTILUS, libnautilus-extension >= $NAUTILUS_REQUIRED) -+PKG_CHECK_MODULES(NAUTILUS, libnautilus-extension-4 >= $NAUTILUS_REQUIRED) - PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED) -+PKG_CHECK_MODULES(GTK, gtk4 >= 4.6.0) -+ -+AC_SUBST(GTK_CFLAGS) - - AC_PATH_PROG([PYTHON3], [python3]) - -@@ -84,10 +87,10 @@ AC_MSG_CHECKING([for nautilus extension directory]) - if test -n "$with_nautilus_extension_dir"; then - NAUTILUS_EXTENSION_DIR=$with_nautilus_extension_dir - else -- NAUTILUS_EXTENSION_DIR=`$PKG_CONFIG --variable=extensiondir libnautilus-extension` -+ NAUTILUS_EXTENSION_DIR=`$PKG_CONFIG --variable=extensiondir libnautilus-extension-4` - fi - if test -z "$NAUTILUS_EXTENSION_DIR"; then -- NAUTILUS_EXTENSION_DIR='${exec_prefix}/lib/nautilus/extension-1.0' -+ NAUTILUS_EXTENSION_DIR='${exec_prefix}/lib/nautilus/extension-4' - fi - - AC_MSG_RESULT([${NAUTILUS_EXTENSION_DIR}]) -diff --git a/src/Makefile.am b/src/Makefile.am -index 15d6687..c521ec5 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -13,6 +13,7 @@ libnautilus_dropbox_la_CFLAGS = \ - $(WARN_CFLAGS) \ - $(DISABLE_DEPRECATED_CFLAGS) \ - $(NAUTILUS_CFLAGS) \ -+ $(GTK_CFLAGS) \ - $(GLIB_CFLAGS) - - if DEBUG -diff --git a/src/dropbox.c b/src/dropbox.c -index 0d59559..8162aa9 100644 ---- a/src/dropbox.c -+++ b/src/dropbox.c -@@ -27,9 +27,6 @@ - - #include - --#include --#include -- - #include "nautilus-dropbox.h" - - static GType type_list[1]; -@@ -41,9 +38,6 @@ nautilus_module_initialize (GTypeModule *module) { - nautilus_dropbox_register_type (module); - type_list[0] = NAUTILUS_TYPE_DROPBOX; - -- dropbox_use_nautilus_submenu_workaround -- = (NAUTILUS_VERSION_MAJOR < 2 || -- (NAUTILUS_VERSION_MAJOR == 2 && NAUTILUS_VERSION_MINOR <= 22)); - dropbox_use_operation_in_progress_workaround = TRUE; - } - -diff --git a/src/nautilus-dropbox.c b/src/nautilus-dropbox.c -index c75ccbf..b9c10b4 100644 ---- a/src/nautilus-dropbox.c -+++ b/src/nautilus-dropbox.c -@@ -37,9 +37,7 @@ - #include - #include - --#include --#include --#include -+#include - - #include "g-util.h" - #include "dropbox-command-client.h" -@@ -49,7 +47,7 @@ - static char *emblems[] = {"dropbox-uptodate", "dropbox-syncing", "dropbox-unsyncable"}; - gchar *DEFAULT_EMBLEM_PATHS[2] = { EMBLEMDIR , NULL }; - --gboolean dropbox_use_nautilus_submenu_workaround; -+ - gboolean dropbox_use_operation_in_progress_workaround; - - static GType dropbox_type = 0; -@@ -630,13 +628,6 @@ nautilus_dropbox_parse_menu(gchar **options, - g_object_set_property (G_OBJECT(item), "sensitive", &sensitive); - } - -- /* taken from nautilus-file-repairer (http://repairer.kldp.net/): -- * this code is a workaround for a bug of nautilus -- * See: http://bugzilla.gnome.org/show_bug.cgi?id=508878 */ -- if (dropbox_use_nautilus_submenu_workaround) { -- toret = g_list_append(toret, item); -- } -- - g_object_unref(item); - g_string_free(new_action_string, TRUE); - ret++; -@@ -661,7 +652,6 @@ get_file_items_callback(GHashTable *response, gpointer ud) - - static GList * - nautilus_dropbox_get_file_items(NautilusMenuProvider *provider, -- GtkWidget *window, - GList *files) - { - /* -@@ -778,14 +768,13 @@ add_emblem_paths(GHashTable* emblem_paths_response) - - gchar **emblem_paths_list; - int i; -- -- GtkIconTheme *theme = gtk_icon_theme_get_default(); -+ GtkIconTheme *theme = gtk_icon_theme_get_for_display (gdk_display_get_default ()); - - if (emblem_paths_response && - (emblem_paths_list = g_hash_table_lookup(emblem_paths_response, "path"))) { - for (i = 0; emblem_paths_list[i] != NULL; i++) { - if (emblem_paths_list[i][0]) -- gtk_icon_theme_append_search_path(theme, emblem_paths_list[i]); -+ gtk_icon_theme_add_search_path(theme, emblem_paths_list[i]); - } - } - g_hash_table_unref(emblem_paths_response); -@@ -804,15 +793,14 @@ remove_emblem_paths(GHashTable* emblem_paths_response) - goto exit; - - // We need to remove the old paths. -- GtkIconTheme * icon_theme = gtk_icon_theme_get_default(); - gchar ** paths; -- gint path_count; -+ GtkIconTheme *theme = gtk_icon_theme_get_for_display (gdk_display_get_default ()); - -- gtk_icon_theme_get_search_path(icon_theme, &paths, &path_count); -+ paths = gtk_icon_theme_get_search_path(theme); - - gint i, j, out = 0; - gboolean found = FALSE; -- for (i = 0; i < path_count; i++) { -+ for (i = 0; paths[i] != NULL; i++) { - gboolean keep = TRUE; - for (j = 0; emblem_paths_list[j] != NULL; j++) { - if (emblem_paths_list[j][0]) { -@@ -834,7 +822,7 @@ remove_emblem_paths(GHashTable* emblem_paths_response) - accomodate the changes */ - if (found) { - paths[out] = NULL; /* Clear the last one */ -- gtk_icon_theme_set_search_path(icon_theme, (const gchar **)paths, out); -+ gtk_icon_theme_set_search_path(theme, (const gchar **)paths); - } - - g_strfreev(paths); -@@ -888,13 +876,13 @@ on_disconnect(NautilusDropbox *cvs) { - - - static void --nautilus_dropbox_menu_provider_iface_init (NautilusMenuProviderIface *iface) { -+nautilus_dropbox_menu_provider_iface_init (NautilusMenuProviderInterface *iface) { - iface->get_file_items = nautilus_dropbox_get_file_items; - return; - } - - static void --nautilus_dropbox_info_provider_iface_init (NautilusInfoProviderIface *iface) { -+nautilus_dropbox_info_provider_iface_init (NautilusInfoProviderInterface *iface) { - iface->update_file_info = nautilus_dropbox_update_file_info; - iface->cancel_update = nautilus_dropbox_cancel_update; - return; -diff --git a/src/nautilus-dropbox.h b/src/nautilus-dropbox.h -index 65734be..44faa27 100644 ---- a/src/nautilus-dropbox.h -+++ b/src/nautilus-dropbox.h -@@ -27,7 +27,7 @@ - #include - #include - --#include -+#include - - #include "dropbox-command-client.h" - #include "nautilus-dropbox-hooks.h" From fa7406f51fc948c8ca871a276b67078a7b9bc48c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=A9clairevoyant?= <848000+eclairevoyant@users.noreply.github.com> Date: Fri, 20 Oct 2023 00:34:56 -0400 Subject: [PATCH 3/3] dropbox-cli: add meta.mainProgram --- pkgs/applications/networking/dropbox/cli.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/networking/dropbox/cli.nix b/pkgs/applications/networking/dropbox/cli.nix index 460780461a84..38c522056376 100644 --- a/pkgs/applications/networking/dropbox/cli.nix +++ b/pkgs/applications/networking/dropbox/cli.nix @@ -66,6 +66,8 @@ stdenv.mkDerivation { homepage = "https://www.dropbox.com"; description = "Command line client for the dropbox daemon"; license = lib.licenses.gpl3Plus; + mainProgram = "dropbox"; + maintainers = with lib.maintainers; [ eclairevoyant ]; # NOTE: Dropbox itself only works on linux, so this is ok. platforms = lib.platforms.linux; };