diff --git a/nixos/modules/services/x11/desktop-managers/budgie.nix b/nixos/modules/services/x11/desktop-managers/budgie.nix index 42a828bcbcbc1..23024ee7f6f7d 100644 --- a/nixos/modules/services/x11/desktop-managers/budgie.nix +++ b/nixos/modules/services/x11/desktop-managers/budgie.nix @@ -139,6 +139,7 @@ in { # Update user directories. xdg-user-dirs + xdg-user-dirs-gtk ] ++ lib.optional config.networking.networkmanager.enable pkgs.networkmanagerapplet ++ (utils.removePackagesByName [ diff --git a/nixos/modules/services/x11/desktop-managers/cinnamon.nix b/nixos/modules/services/x11/desktop-managers/cinnamon.nix index cd5c9e1c948fc..36583aa9f27c4 100644 --- a/nixos/modules/services/x11/desktop-managers/cinnamon.nix +++ b/nixos/modules/services/x11/desktop-managers/cinnamon.nix @@ -169,6 +169,7 @@ in # other glib # for gsettings xdg-user-dirs + xdg-user-dirs-gtk ] ++ utils.removePackagesByName [ # accessibility onboard diff --git a/nixos/modules/services/x11/desktop-managers/gnome.nix b/nixos/modules/services/x11/desktop-managers/gnome.nix index 37240e8173ec7..5cd359067a320 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome.nix @@ -386,6 +386,7 @@ in pkgs.gnome-menus pkgs.gtk3.out # for gtk-launch program pkgs.xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/ + pkgs.xdg-user-dirs-gtk # Used to create the default bookmarks ]; in mandatoryPackages diff --git a/nixos/modules/services/x11/desktop-managers/mate.nix b/nixos/modules/services/x11/desktop-managers/mate.nix index 19235be4aa8d5..ede3456fee7c2 100644 --- a/nixos/modules/services/x11/desktop-managers/mate.nix +++ b/nixos/modules/services/x11/desktop-managers/mate.nix @@ -71,6 +71,7 @@ in pkgs.gtk3.out pkgs.shared-mime-info pkgs.xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/ + pkgs.xdg-user-dirs-gtk pkgs.yelp # for 'Contents' in 'Help' menus ]) config.environment.mate.excludePackages; diff --git a/nixos/modules/services/x11/desktop-managers/pantheon.nix b/nixos/modules/services/x11/desktop-managers/pantheon.nix index 1ab898d35bc2a..f47656638b7d8 100644 --- a/nixos/modules/services/x11/desktop-managers/pantheon.nix +++ b/nixos/modules/services/x11/desktop-managers/pantheon.nix @@ -214,6 +214,7 @@ in onboard sound-theme-freedesktop xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/ + xdg-user-dirs-gtk ]) ++ (with pkgs.pantheon; [ # Artwork elementary-gtk-theme diff --git a/nixos/modules/services/x11/desktop-managers/xfce.nix b/nixos/modules/services/x11/desktop-managers/xfce.nix index 98d3555ccbc5e..dfd54908953d6 100644 --- a/nixos/modules/services/x11/desktop-managers/xfce.nix +++ b/nixos/modules/services/x11/desktop-managers/xfce.nix @@ -98,6 +98,7 @@ in # Needed by Xfce's xinitrc script xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/ + xdg-user-dirs-gtk exo garcon diff --git a/pkgs/by-name/xd/xdg-user-dirs-gtk/package.nix b/pkgs/by-name/xd/xdg-user-dirs-gtk/package.nix new file mode 100644 index 0000000000000..8c58d36220ca9 --- /dev/null +++ b/pkgs/by-name/xd/xdg-user-dirs-gtk/package.nix @@ -0,0 +1,54 @@ +{ + stdenv, + lib, + fetchurl, + intltool, + pkg-config, + xdg-user-dirs, + wrapGAppsHook3, + gtk3, + gnome, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "xdg-user-dirs-gtk"; + version = "0.11"; + + src = fetchurl { + url = "mirror://gnome/sources/xdg-user-dirs-gtk/${lib.versions.majorMinor finalAttrs.version}/xdg-user-dirs-gtk-${finalAttrs.version}.tar.xz"; + hash = "sha256-U0vVY9PA4/jcvzV4y4qw5J07pByWbUd8ivlDg2QSHn0="; + }; + + nativeBuildInputs = [ + intltool + pkg-config + xdg-user-dirs # for AC_PATH_PROG + wrapGAppsHook3 + ]; + + buildInputs = [ gtk3 ]; + + postPatch = '' + # Fetch translations from correct localedir. + substituteInPlace update.c --replace-fail \ + 'bindtextdomain ("xdg-user-dirs", GLIBLOCALEDIR);' \ + 'bindtextdomain ("xdg-user-dirs", "${xdg-user-dirs}/share/locale");' + ''; + + preFixup = '' + gappsWrapperArgs+=(--prefix PATH : "${lib.makeBinPath [ xdg-user-dirs ]}") + ''; + + passthru.updateScript = gnome.updateScript { + packageName = "xdg-user-dirs-gtk"; + }; + + meta = { + homepage = "https://gitlab.gnome.org/GNOME/xdg-user-dirs-gtk"; + description = "companion to xdg-user-dirs that integrates it into the GNOME desktop and GTK applications"; + license = lib.licenses.gpl2Only; + maintainers = lib.teams.gnome.members; + platforms = lib.platforms.unix; + mainProgram = "xdg-user-dirs-gtk-update"; + }; +})