diff --git a/pkgs/development/libraries/xdg-desktop-portal-gnome/default.nix b/pkgs/development/libraries/xdg-desktop-portal-gnome/default.nix new file mode 100644 index 000000000000..ad68f13fe0f1 --- /dev/null +++ b/pkgs/development/libraries/xdg-desktop-portal-gnome/default.nix @@ -0,0 +1,60 @@ +{ stdenv +, lib +, fetchurl +, meson +, ninja +, pkg-config +, wrapGAppsHook4 +, fontconfig +, glib +, gsettings-desktop-schemas +, gtk4 +, libadwaita +, xdg-desktop-portal +, wayland +, gnome +}: + +stdenv.mkDerivation rec { + pname = "xdg-desktop-portal-gnome"; + version = "41.1"; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "u6FEGZ5+1LlJCyScGvZFqGnWKZMmXerDjyGb8EL//fI="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + wrapGAppsHook4 + ]; + + buildInputs = [ + fontconfig + glib + gsettings-desktop-schemas # settings exposed by settings portal + gtk4 + libadwaita + xdg-desktop-portal + wayland # required by GTK 4 + ]; + + mesonFlags = [ + "-Dsystemduserunitdir=${placeholder "out"}/lib/systemd/user" + ]; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + }; + }; + + meta = with lib; { + description = "Backend implementation for xdg-desktop-portal for the GNOME desktop environment"; + maintainers = teams.gnome.members; + platforms = platforms.linux; + license = licenses.lgpl21Plus; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 81b1a182177a..74f6dfe30ce3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -28760,6 +28760,8 @@ with pkgs; xdg-desktop-portal = callPackage ../development/libraries/xdg-desktop-portal { }; + xdg-desktop-portal-gnome = callPackage ../development/libraries/xdg-desktop-portal-gnome { }; + xdg-desktop-portal-gtk = callPackage ../development/libraries/xdg-desktop-portal-gtk { }; xdg-desktop-portal-wlr = callPackage ../development/libraries/xdg-desktop-portal-wlr { };