about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/gnome-desktop
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/gnome-desktop')
-rw-r--r--nixpkgs/pkgs/development/libraries/gnome-desktop/bubblewrap-paths.patch17
-rw-r--r--nixpkgs/pkgs/development/libraries/gnome-desktop/default.nix101
2 files changed, 118 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/gnome-desktop/bubblewrap-paths.patch b/nixpkgs/pkgs/development/libraries/gnome-desktop/bubblewrap-paths.patch
new file mode 100644
index 000000000000..c31e093f4b7e
--- /dev/null
+++ b/nixpkgs/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/nixpkgs/pkgs/development/libraries/gnome-desktop/default.nix b/nixpkgs/pkgs/development/libraries/gnome-desktop/default.nix
new file mode 100644
index 000000000000..db95029c804e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gnome-desktop/default.nix
@@ -0,0 +1,101 @@
+{ lib
+, stdenv
+, fetchurl
+, substituteAll
+, pkg-config
+, libxslt
+, ninja
+, gnome
+, gtk3
+, gtk4
+, 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 = "44.0";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gnome-desktop/${lib.versions.major version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-QsdzdF2EuhS8HPHExvRgYUiAOlzTN5QcY5ZHlfPFnUI=";
+  };
+
+  patches = lib.optionals stdenv.isLinux [
+    (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 = [
+    xkeyboard_config
+    libxkbcommon # for xkbregistry
+    isocodes
+    gtk3
+    gtk4
+    glib
+  ] ++ lib.optionals stdenv.isLinux [
+    bubblewrap
+    wayland
+    libseccomp
+    systemd
+  ];
+
+  propagatedBuildInputs = [
+    gsettings-desktop-schemas
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+    "-Ddesktop_docs=false"
+  ] ++ lib.optionals (!stdenv.isLinux) [
+    "-Dsystemd=disabled"
+    "-Dudev=disabled"
+  ];
+
+  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.unix;
+    maintainers = teams.gnome.members;
+  };
+}