summary refs log tree commit diff
path: root/pkgs/applications/graphics/shutter
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2018-05-03 11:25:19 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2018-05-04 22:33:37 +0200
commit40226e647e5481f8276f2265207d262d4ab750ea (patch)
treecd54411c0231814291645a89fa6ce4059a60497c /pkgs/applications/graphics/shutter
parentae7c71e26706c0fa6653831456468447b417b868 (diff)
downloadnixpkgs-40226e647e5481f8276f2265207d262d4ab750ea.tar
nixpkgs-40226e647e5481f8276f2265207d262d4ab750ea.tar.gz
nixpkgs-40226e647e5481f8276f2265207d262d4ab750ea.tar.bz2
nixpkgs-40226e647e5481f8276f2265207d262d4ab750ea.tar.lz
nixpkgs-40226e647e5481f8276f2265207d262d4ab750ea.tar.xz
nixpkgs-40226e647e5481f8276f2265207d262d4ab750ea.tar.zst
nixpkgs-40226e647e5481f8276f2265207d262d4ab750ea.zip
shutter: wrap `XDG_DATA_DIRS` with `hicolor-icon-theme`
When opening `shutter` it adds an indicator icon to the status bar.
However this doesn't happen (and an ugly default icon will be used) if
`shutter` can't find the `hicolor-icon-theme`. In such a case a warning
like this can be found in `stderr`:

```
Gtk-WARNING **: Could not find the icon 'image-png'. The 'hicolor' theme
was not found either, perhaps you need to install it.
```

As I don't think that we should force users to install this theme
globally and several other packages including `tor-browser`, `gparted`
or `clawsmail` add `hicolor-icon-theme` to their closure this seems to
be a fair measure.
Diffstat (limited to 'pkgs/applications/graphics/shutter')
-rw-r--r--pkgs/applications/graphics/shutter/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/applications/graphics/shutter/default.nix b/pkgs/applications/graphics/shutter/default.nix
index 2cc127a3fc6..3bc814e1e75 100644
--- a/pkgs/applications/graphics/shutter/default.nix
+++ b/pkgs/applications/graphics/shutter/default.nix
@@ -1,4 +1,6 @@
-{ stdenv, fetchurl, fetchpatch, perl, perlPackages, makeWrapper, imagemagick, gdk_pixbuf, librsvg }:
+{ stdenv, fetchurl, fetchpatch, perl, perlPackages, makeWrapper, imagemagick, gdk_pixbuf, librsvg
+, hicolor-icon-theme
+}:
 
 let
   perlModules = with perlPackages;
@@ -29,6 +31,7 @@ stdenv.mkDerivation rec {
     wrapProgram $out/bin/shutter \
       --set PERL5LIB "${stdenv.lib.makePerlPath perlModules}" \
       --prefix PATH : "${imagemagick.out}/bin" \
+      --suffix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
       --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
   '';