about summary refs log tree commit diff
path: root/pkgs/desktops/gnome-3/core/gnome-screenshot
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/desktops/gnome-3/core/gnome-screenshot')
-rw-r--r--pkgs/desktops/gnome-3/core/gnome-screenshot/default.nix28
-rw-r--r--pkgs/desktops/gnome-3/core/gnome-screenshot/prevent-cache-updates.patch21
-rw-r--r--pkgs/desktops/gnome-3/core/gnome-screenshot/src.nix6
3 files changed, 40 insertions, 15 deletions
diff --git a/pkgs/desktops/gnome-3/core/gnome-screenshot/default.nix b/pkgs/desktops/gnome-3/core/gnome-screenshot/default.nix
index 1f933e1b3c57..69a967d6d247 100644
--- a/pkgs/desktops/gnome-3/core/gnome-screenshot/default.nix
+++ b/pkgs/desktops/gnome-3/core/gnome-screenshot/default.nix
@@ -1,26 +1,30 @@
-{ stdenv, intltool, fetchurl, pkgconfig, libcanberra_gtk3
-, bash, gtk3, glib, wrapGAppsHook
-, itstool, gnome3, librsvg, gdk_pixbuf }:
+{ stdenv, gettext, libxml2, fetchurl, pkgconfig, libcanberra_gtk3
+, bash, gtk3, glib, meson, ninja, wrapGAppsHook, appstream-glib
+, gnome3, librsvg, gdk_pixbuf }:
 
 stdenv.mkDerivation rec {
   inherit (import ./src.nix fetchurl) name src;
 
   doCheck = true;
 
-  NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0";
+  checkPhase = "meson test";
+
+
+  postPatch = ''
+    chmod +x build-aux/postinstall.py # patchShebangs requires executable file
+    patchShebangs build-aux/postinstall.py
+  '';
 
   propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
   propagatedBuildInputs = [ gdk_pixbuf gnome3.defaultIconTheme librsvg ];
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ bash gtk3 glib intltool itstool libcanberra_gtk3
-                  gnome3.gsettings_desktop_schemas wrapGAppsHook ];
+  nativeBuildInputs = [ meson ninja pkgconfig gettext appstream-glib libxml2 wrapGAppsHook ];
+  buildInputs = [ bash gtk3 glib libcanberra_gtk3
+                  gnome3.gsettings_desktop_schemas ];
 
-  preFixup = ''
-    gappsWrapperArgs+=(
-      --prefix XDG_DATA_DIRS : "${gtk3.out}/share:${gnome3.gnome_themes_standard}/share"
-    )
-  '';
+  patches = [
+    ./prevent-cache-updates.patch
+  ];
 
   meta = with stdenv.lib; {
     homepage = https://en.wikipedia.org/wiki/GNOME_Screenshot;
diff --git a/pkgs/desktops/gnome-3/core/gnome-screenshot/prevent-cache-updates.patch b/pkgs/desktops/gnome-3/core/gnome-screenshot/prevent-cache-updates.patch
new file mode 100644
index 000000000000..370d09cd2f02
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/gnome-screenshot/prevent-cache-updates.patch
@@ -0,0 +1,21 @@
+--- a/build-aux/postinstall.py
++++ b/build-aux/postinstall.py
+@@ -8,18 +8,6 @@
+ 
+ # Packaging tools define DESTDIR and this isn't needed for them
+ if 'DESTDIR' not in os.environ:
+-    print('Updating icon cache...')
+-    icon_cache_dir = os.path.join(datadir, 'icons', 'hicolor')
+-    if not os.path.exists(icon_cache_dir):
+-        os.makedirs(icon_cache_dir)
+-    subprocess.call(['gtk-update-icon-cache', '-qtf', icon_cache_dir])
+-
+-    print('Updating desktop database...')
+-    desktop_database_dir = os.path.join(datadir, 'applications')
+-    if not os.path.exists(desktop_database_dir):
+-        os.makedirs(desktop_database_dir)
+-    subprocess.call(['update-desktop-database', '-q', desktop_database_dir])
+-
+     print('Compiling GSettings schemas...')
+     schemas_dir = os.path.join(datadir, 'glib-2.0', 'schemas')
+     if not os.path.exists(schemas_dir):
diff --git a/pkgs/desktops/gnome-3/core/gnome-screenshot/src.nix b/pkgs/desktops/gnome-3/core/gnome-screenshot/src.nix
index 3668417d280b..72b1e6625452 100644
--- a/pkgs/desktops/gnome-3/core/gnome-screenshot/src.nix
+++ b/pkgs/desktops/gnome-3/core/gnome-screenshot/src.nix
@@ -1,10 +1,10 @@
 # Autogenerated by maintainers/scripts/gnome.sh update
 
 fetchurl: {
-  name = "gnome-screenshot-3.22.0";
+  name = "gnome-screenshot-3.26.0";
 
   src = fetchurl {
-    url = mirror://gnome/sources/gnome-screenshot/3.22/gnome-screenshot-3.22.0.tar.xz;
-    sha256 = "8a05f14b3c7c6cb42f9848ad0332034c7fe5c34a69742910203588fd60b00230";
+    url = mirror://gnome/sources/gnome-screenshot/3.26/gnome-screenshot-3.26.0.tar.xz;
+    sha256 = "1bbc11595d3822f4b92319cdf9ba49dd00f5471b6046c590847dc424a874c8bb";
   };
 }