xdg-user-dirs-gtk: init at 0.11

https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/1625#note_2234235
This commit is contained in:
Bobby Rong 2024-09-30 00:27:00 +08:00
parent 283ba1fdcf
commit 09918511b8
No known key found for this signature in database
2 changed files with 66 additions and 0 deletions

View File

@ -383,6 +383,7 @@ in
pkgs.gnome-menus pkgs.gnome-menus
pkgs.gtk3.out # for gtk-launch program 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 # 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 in
mandatoryPackages mandatoryPackages

View File

@ -0,0 +1,65 @@
{
stdenv,
lib,
fetchurl,
fetchpatch,
autoreconfHook,
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=";
};
patches = [
# Fix cross: ./configure: line 7633: no: command not found
(fetchpatch {
url = "https://salsa.debian.org/gnome-team/xdg-user-dirs-gtk/-/raw/b047b613d5f18aebe8e9bca4e0a82b75b2d1f8c4/debian/patches/fix-pkg-config-cross-compilation.patch";
hash = "sha256-QHq8hlX0SS+T6jtagMs9qApJCWFG1PHxftzoID2Nag4=";
})
];
nativeBuildInputs = [
autoreconfHook
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";
};
})