diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2022-03-16 22:16:40 +0100 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2022-03-25 15:01:21 +0100 |
commit | 7d2ded8c0fa007233be1a76f192fbd389ac41f80 (patch) | |
tree | fb738dbcebc5c626056119510989d19d296ba6b3 /pkgs/development/libraries/gnome-desktop | |
parent | d6e2e39a6e5998e4ad4cbd9d422835b365dfa763 (diff) |
gnome-desktop: Move into top-level
Diffstat (limited to 'pkgs/development/libraries/gnome-desktop')
-rw-r--r-- | pkgs/development/libraries/gnome-desktop/bubblewrap-paths.patch | 17 | ||||
-rw-r--r-- | pkgs/development/libraries/gnome-desktop/default.nix | 97 |
2 files changed, 114 insertions, 0 deletions
diff --git a/pkgs/development/libraries/gnome-desktop/bubblewrap-paths.patch b/pkgs/development/libraries/gnome-desktop/bubblewrap-paths.patch new file mode 100644 index 0000000000000..c31e093f4b7e1 --- /dev/null +++ b/pkgs/development/libraries/gnome-desktop/bubblewrap-paths.patch @@ -0,0 +1,17 @@ +diff --git a/libgnome-desktop/gnome-desktop-thumbnail-script.c b/libgnome-desktop/gnome-desktop-thumbnail-script.c +index ddcc1511..546c2a36 100644 +--- a/libgnome-desktop/gnome-desktop-thumbnail-script.c ++++ b/libgnome-desktop/gnome-desktop-thumbnail-script.c +@@ -555,9 +555,9 @@ add_bwrap (GPtrArray *array, + g_return_val_if_fail (script->s_infile != NULL, FALSE); + + add_args (array, +- "bwrap", +- "--ro-bind", "/usr", "/usr", +- "--ro-bind-try", "/etc/ld.so.cache", "/etc/ld.so.cache", ++ "@bubblewrap_bin@", ++ "--ro-bind", "@storeDir@", "@storeDir@", ++ "--ro-bind-try", "/run/current-system", "/run/current-system", + NULL); + + /* These directories might be symlinks into /usr/... */ diff --git a/pkgs/development/libraries/gnome-desktop/default.nix b/pkgs/development/libraries/gnome-desktop/default.nix new file mode 100644 index 0000000000000..85a414e540a1a --- /dev/null +++ b/pkgs/development/libraries/gnome-desktop/default.nix @@ -0,0 +1,97 @@ +{ lib +, stdenv +, fetchurl +, substituteAll +, pkg-config +, libxslt +, ninja +, gnome +, gtk3 +, glib +, gettext +, libxml2 +, xkeyboard_config +, libxkbcommon +, isocodes +, meson +, wayland +, libseccomp +, systemd +, bubblewrap +, gobject-introspection +, gtk-doc +, docbook-xsl-nons +, gsettings-desktop-schemas +}: + +stdenv.mkDerivation rec { + pname = "gnome-desktop"; + version = "41.3"; + + outputs = [ "out" "dev" "devdoc" ]; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-desktop/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "sha256-jNHKq5MRgowEUkaMalBnqbxEY4NbI6FL5E6P2bAwAcY="; + }; + + patches = [ + (substituteAll { + src = ./bubblewrap-paths.patch; + bubblewrap_bin = "${bubblewrap}/bin/bwrap"; + inherit (builtins) storeDir; + }) + ]; + + nativeBuildInputs = [ + pkg-config + meson + ninja + gettext + libxslt + libxml2 + gobject-introspection + gtk-doc + docbook-xsl-nons + glib + ]; + + buildInputs = [ + bubblewrap + xkeyboard_config + libxkbcommon # for xkbregistry + isocodes + wayland + gtk3 + glib + libseccomp + systemd + ]; + + propagatedBuildInputs = [ + gsettings-desktop-schemas + ]; + + mesonFlags = [ + "-Dgtk_doc=true" + "-Ddesktop_docs=false" + "-Ddate_in_gnome_version=false" + "-Dgnome_distributor=NixOS" + ]; + + separateDebugInfo = stdenv.isLinux; + + passthru = { + updateScript = gnome.updateScript { + packageName = "gnome-desktop"; + }; + }; + + meta = with lib; { + description = "Library with common API for various GNOME modules"; + homepage = "https://gitlab.gnome.org/GNOME/gnome-desktop"; + license = with licenses; [ gpl2Plus lgpl2Plus ]; + platforms = platforms.linux; + maintainers = teams.gnome.members; + }; +} |