diff options
Diffstat (limited to 'pkgs/by-name/na/nautilus')
-rw-r--r-- | pkgs/by-name/na/nautilus/extension_dir.patch | 24 | ||||
-rw-r--r-- | pkgs/by-name/na/nautilus/fix-paths.patch | 13 | ||||
-rw-r--r-- | pkgs/by-name/na/nautilus/package.nix | 140 |
3 files changed, 177 insertions, 0 deletions
diff --git a/pkgs/by-name/na/nautilus/extension_dir.patch b/pkgs/by-name/na/nautilus/extension_dir.patch new file mode 100644 index 0000000000000..d7cd161a8dfc5 --- /dev/null +++ b/pkgs/by-name/na/nautilus/extension_dir.patch @@ -0,0 +1,24 @@ +diff --git a/src/nautilus-module.c b/src/nautilus-module.c +index cd889ff18..e2cd6468e 100644 +--- a/src/nautilus-module.c ++++ b/src/nautilus-module.c +@@ -267,6 +267,7 @@ void + nautilus_module_setup (void) + { + static gboolean initialized = FALSE; ++ const gchar* extensiondir = NULL; + const gchar *disable_plugins; + + disable_plugins = g_getenv ("NAUTILUS_DISABLE_PLUGINS"); +@@ -280,7 +281,12 @@ nautilus_module_setup (void) + { + initialized = TRUE; + +- load_module_dir (NAUTILUS_EXTENSIONDIR); ++ extensiondir = g_getenv ("NAUTILUS_4_EXTENSION_DIR"); ++ if (extensiondir == NULL) { ++ extensiondir = NAUTILUS_EXTENSIONDIR; ++ } ++ ++ load_module_dir (extensiondir); + } diff --git a/pkgs/by-name/na/nautilus/fix-paths.patch b/pkgs/by-name/na/nautilus/fix-paths.patch new file mode 100644 index 0000000000000..dc9874359b233 --- /dev/null +++ b/pkgs/by-name/na/nautilus/fix-paths.patch @@ -0,0 +1,13 @@ +diff --git a/src/nautilus-tag-manager.c b/src/nautilus-tag-manager.c +index 28b96c996..0b1fad9ab 100644 +--- a/src/nautilus-tag-manager.c ++++ b/src/nautilus-tag-manager.c +@@ -962,7 +962,7 @@ child_watch_cb (GPid pid, + static void + export_tracker2_data (NautilusTagManager *self) + { +- gchar *argv[] = {"tracker3", "export", "--2to3", "files-starred", "--keyfile", NULL}; ++ gchar *argv[] = {"@tracker@/bin/tracker3", "export", "--2to3", "files-starred", "--keyfile", NULL}; + gint stdout_fd; + GPid child_pid; + g_autoptr (GError) error = NULL; diff --git a/pkgs/by-name/na/nautilus/package.nix b/pkgs/by-name/na/nautilus/package.nix new file mode 100644 index 0000000000000..660867e81ebd8 --- /dev/null +++ b/pkgs/by-name/na/nautilus/package.nix @@ -0,0 +1,140 @@ +{ + lib, + stdenv, + fetchurl, + meson, + ninja, + pkg-config, + gi-docgen, + docbook-xsl-nons, + gettext, + desktop-file-utils, + wrapGAppsHook4, + gtk4, + libadwaita, + libportal-gtk4, + gnome, + adwaita-icon-theme, + gnome-autoar, + glib-networking, + shared-mime-info, + libnotify, + libexif, + libjxl, + libseccomp, + librsvg, + webp-pixbuf-loader, + tracker, + tracker-miners, + gexiv2, + libselinux, + libcloudproviders, + gdk-pixbuf, + substituteAll, + gnome-desktop, + gst_all_1, + gsettings-desktop-schemas, + gnome-user-share, + gobject-introspection, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "nautilus"; + version = "46.2"; + + outputs = [ + "out" + "dev" + "devdoc" + ]; + + src = fetchurl { + url = "mirror://gnome/sources/nautilus/${lib.versions.major finalAttrs.version}/nautilus-${finalAttrs.version}.tar.xz"; + hash = "sha256-bujJkBm540R/aRjWgjKiDeyonlUlwFgFQyt9iEDKcfo="; + }; + + patches = [ + # Allow changing extension directory using environment variable. + ./extension_dir.patch + + # Hardcode required paths. + (substituteAll { + src = ./fix-paths.patch; + inherit tracker; + }) + ]; + + nativeBuildInputs = [ + desktop-file-utils + gettext + gobject-introspection + meson + ninja + pkg-config + gi-docgen + docbook-xsl-nons + wrapGAppsHook4 + ]; + + buildInputs = [ + gexiv2 + glib-networking + gnome-desktop + adwaita-icon-theme + gsettings-desktop-schemas + gnome-user-share + gst_all_1.gst-plugins-base + gtk4 + libadwaita + libportal-gtk4 + libexif + libnotify + libseccomp + libselinux + gdk-pixbuf + libcloudproviders + shared-mime-info + tracker + tracker-miners + gnome-autoar + ]; + + propagatedBuildInputs = [ + gtk4 + ]; + + mesonFlags = [ + "-Ddocs=true" + ]; + + preFixup = '' + gappsWrapperArgs+=( + # Thumbnailers + --prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share" + --prefix XDG_DATA_DIRS : "${libjxl}/share" + --prefix XDG_DATA_DIRS : "${librsvg}/share" + --prefix XDG_DATA_DIRS : "${webp-pixbuf-loader}/share" + --prefix XDG_DATA_DIRS : "${shared-mime-info}/share" + ) + ''; + + postFixup = '' + # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. + moveToOutput "share/doc" "$devdoc" + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = "nautilus"; + }; + }; + + meta = with lib; { + description = "File manager for GNOME"; + homepage = "https://apps.gnome.org/Nautilus/"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = teams.gnome.members; + mainProgram = "nautilus"; + }; +}) |