summary refs log tree commit diff
path: root/pkgs/desktops/gnome/core/gnome-desktop
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
committerAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
commit62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch)
treec2630f69080637987b68acb1ee8676d2681fe304 /pkgs/desktops/gnome/core/gnome-desktop
parentd9c82ed3044c72cecf01c6ea042489d30914577c (diff)
parente24069138dfec3ef94f211f1da005bb5395adc11 (diff)
downloadnixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/desktops/gnome/core/gnome-desktop')
-rw-r--r--pkgs/desktops/gnome/core/gnome-desktop/bubblewrap-paths.patch15
-rw-r--r--pkgs/desktops/gnome/core/gnome-desktop/default.nix96
2 files changed, 111 insertions, 0 deletions
diff --git a/pkgs/desktops/gnome/core/gnome-desktop/bubblewrap-paths.patch b/pkgs/desktops/gnome/core/gnome-desktop/bubblewrap-paths.patch
new file mode 100644
index 00000000000..57eb4b3d44a
--- /dev/null
+++ b/pkgs/desktops/gnome/core/gnome-desktop/bubblewrap-paths.patch
@@ -0,0 +1,15 @@
+--- a/libgnome-desktop/gnome-desktop-thumbnail-script.c
++++ b/libgnome-desktop/gnome-desktop-thumbnail-script.c
+@@ -536,9 +536,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", "/etc/ld.so.cache", "/etc/ld.so.cache",
++	    "@bubblewrap_bin@",
++	    "--ro-bind", "@storeDir@", "@storeDir@",
++	    "--ro-bind", "/run/current-system", "/run/current-system",
+ 	    NULL);
+ 
+   /* These directories might be symlinks into /usr/... */
diff --git a/pkgs/desktops/gnome/core/gnome-desktop/default.nix b/pkgs/desktops/gnome/core/gnome-desktop/default.nix
new file mode 100644
index 00000000000..1a7887fc35d
--- /dev/null
+++ b/pkgs/desktops/gnome/core/gnome-desktop/default.nix
@@ -0,0 +1,96 @@
+{ 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 = "40.3";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gnome-desktop/${lib.versions.major version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-U9ZGlEbXoJsCaTZ2nllTUv3zvlYy80a7Af5XyLUWLOs=";
+  };
+
+  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"
+  ];
+
+  separateDebugInfo = stdenv.isLinux;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = "gnome-desktop";
+      attrPath = "gnome.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;
+  };
+}