MyPaint, fix impurity: add hicolor_icon_theme wrapper to ensure MyPaint can start

MyPaint fails to find its own icons and refuses to start if another
icon theme is not available on the system. Running
gtk-update-icon-cache on MyPaint's share/icons/hicolor folder did not
help, and setting the XDG_DATA_DIRS to point to MyPaint's icons also
didn't work.

https://gna.org/bugs/?18460

Thanks to Kim Simmons for reporting this and helping to debug.

+9 -6
+9 -6
pkgs/applications/graphics/mypaint/default.nix
··· 1 - { stdenv, fetchurl, gettext, glib, gtk, json_c, lcms2, libpng 2 - , makeWrapper, pkgconfig, pygtk, python, pythonPackages, scons, swig 1 + { stdenv, fetchurl, gettext, glib, gtk, hicolor_icon_theme, json_c 2 + , lcms2, libpng , makeWrapper, pkgconfig, pygtk, python, pythonPackages 3 + , scons, swig 3 4 }: 4 5 5 6 stdenv.mkDerivation rec { ··· 11 12 sha256 = "0f7848hr65h909c0jkcx616flc0r4qh53g3kd1cgs2nr1pjmf3bq"; 12 13 }; 13 14 14 - buildInputs = [ 15 + buildInputs = [ 15 16 gettext glib gtk json_c lcms2 libpng makeWrapper pkgconfig pygtk 16 17 python scons swig 17 18 ]; 18 - 19 - propagatedBuildInputs = [ pythonPackages.numpy ]; 19 + 20 + propagatedBuildInputs = [ hicolor_icon_theme pythonPackages.numpy ]; 20 21 21 22 buildPhase = "scons prefix=$out"; 22 23 23 24 installPhase = '' 24 25 scons prefix=$out install 25 26 sed -i -e 's|/usr/bin/env python2.7|${python}/bin/python|' $out/bin/mypaint 26 - wrapProgram $out/bin/mypaint --prefix PYTHONPATH : $PYTHONPATH 27 + wrapProgram $out/bin/mypaint \ 28 + --prefix PYTHONPATH : $PYTHONPATH \ 29 + --prefix XDG_DATA_DIRS ":" "${hicolor_icon_theme}/share" 27 30 ''; 28 31 29 32 meta = with stdenv.lib; {