1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

gnome3.gnome-screenshot: clean up

This commit is contained in:
Jan Tojnar 2018-03-22 20:04:59 +01:00
parent fe747012db
commit e059d22888
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4
2 changed files with 18 additions and 39 deletions

View file

@ -1,20 +1,18 @@
{ stdenv, gettext, libxml2, fetchurl, pkgconfig, libcanberra-gtk3
, bash, gtk3, glib, meson, ninja, wrapGAppsHook, appstream-glib
, gnome3, librsvg, gdk_pixbuf }:
, gtk3, glib, meson, ninja, wrapGAppsHook, appstream-glib, desktop-file-utils
, gnome3 }:
stdenv.mkDerivation rec {
name = "gnome-screenshot-${version}";
let
pname = "gnome-screenshot";
version = "3.26.0";
in stdenv.mkDerivation rec {
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://gnome/sources/gnome-screenshot/${gnome3.versionBranch version}/${name}.tar.xz";
url = "mirror://gnome/sources/${pname}/${gnome3.versionBranch version}/${name}.tar.xz";
sha256 = "1bbc11595d3822f4b92319cdf9ba49dd00f5471b6046c590847dc424a874c8bb";
};
passthru = {
updateScript = gnome3.updateScript { packageName = "gnome-screenshot"; attrPath = "gnome3.gnome-screenshot"; };
};
doCheck = true;
postPatch = ''
@ -22,17 +20,19 @@ stdenv.mkDerivation rec {
patchShebangs build-aux/postinstall.py
'';
propagatedUserEnvPkgs = [ gnome3.gnome-themes-standard ];
propagatedBuildInputs = [ gdk_pixbuf gnome3.defaultIconTheme librsvg ];
nativeBuildInputs = [ meson ninja pkgconfig gettext appstream-glib libxml2 wrapGAppsHook ];
buildInputs = [ bash gtk3 glib libcanberra-gtk3
gnome3.gsettings-desktop-schemas ];
patches = [
./prevent-cache-updates.patch
nativeBuildInputs = [ meson ninja pkgconfig gettext appstream-glib libxml2 desktop-file-utils wrapGAppsHook ];
buildInputs = [
gtk3 glib libcanberra-gtk3 gnome3.defaultIconTheme
gnome3.gsettings-desktop-schemas
];
passthru = {
updateScript = gnome3.updateScript {
packageName = "${pname}";
attrPath = "gnome3.${pname}";
};
};
meta = with stdenv.lib; {
homepage = https://en.wikipedia.org/wiki/GNOME_Screenshot;
description = "Utility used in the GNOME desktop environment for taking screenshots";

View file

@ -1,21 +0,0 @@
--- 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):