nixpkgs/pkgs/by-name/xd/xdg-desktop-portal-gnome/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

81 lines
1.7 KiB
Nix

{ stdenv
, lib
, fetchurl
, fontconfig
, glib
, gnome
, gnome-desktop
, gsettings-desktop-schemas
, gtk4
, libadwaita
, libjxl
, librsvg
, meson
, ninja
, pkg-config
, wayland
, wayland-scanner
, webp-pixbuf-loader
, wrapGAppsHook4
, xdg-desktop-portal
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xdg-desktop-portal-gnome";
version = "47.1";
src = fetchurl {
url = "mirror://gnome/sources/xdg-desktop-portal-gnome/${lib.versions.major finalAttrs.version}/xdg-desktop-portal-gnome-${finalAttrs.version}.tar.xz";
hash = "sha256-1CD/chc7BNyUkdPX3YzJYgT38/J8TL6mAkNh6pg592k=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
wayland-scanner
wrapGAppsHook4
];
buildInputs = [
fontconfig
glib
gsettings-desktop-schemas # settings exposed by settings portal
gtk4
libadwaita
gnome-desktop
xdg-desktop-portal
wayland # required by GTK 4
];
mesonFlags = [
"-Dsystemduserunitdir=${placeholder "out"}/lib/systemd/user"
];
postInstall = ''
# Pull in WebP and JXL support for gnome-backgrounds.
# In postInstall to run before gappsWrapperArgsHook.
export GDK_PIXBUF_MODULE_FILE="${gnome._gdkPixbufCacheBuilder_DO_NOT_USE {
extraLoaders = [
libjxl
librsvg
webp-pixbuf-loader
];
}}"
'';
passthru = {
updateScript = gnome.updateScript {
packageName = "xdg-desktop-portal-gnome";
};
};
meta = with lib; {
description = "Backend implementation for xdg-desktop-portal for the GNOME desktop environment";
homepage = "https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome";
maintainers = teams.gnome.members;
platforms = platforms.linux;
license = licenses.lgpl21Plus;
};
})