@@ -1,6 +1,6 @@
1−{ stdenv, lib, fetchurl, pkgconfig, gtk, girara, ncurses, gettext, docutils, file, makeWrapper, zathura_icon, sqlite, glib
2−, synctexSupport ? true, texlive ? null
3−}:
1+{ stdenv, lib, fetchurl, pkgconfig, gtk, girara, ncurses, gettext, docutils
2+, file, makeWrapper, sqlite, glib
3+, synctexSupport ? true, texlive ? null }:
44
55assert synctexSupport -> texlive != null;
66
@@ -13,6 +13,8 @@ stdenv.mkDerivation rec {
1313 sha256 = "0fyb5hak0knqvg90rmdavwcmilhnrwgg1s5ykx9wd3skbpi8nsh8";
1414 };
1515
16+ icon = ./icon.xpm;
17+
1618 buildInputs = [ pkgconfig file gtk girara gettext makeWrapper sqlite glib
1719 ] ++ lib.optional synctexSupport texlive.bin.core;
1820
@@ -27,23 +29,20 @@ stdenv.mkDerivation rec {
2729
2830 postInstall = ''
2931 wrapProgram "$out/bin/zathura" \
30− --prefix PATH ":" "${file}/bin" \
32+ --prefix PATH ":" "${lib.makeBinPath [ file ]}" \
3133 --prefix XDG_CONFIG_DIRS ":" "$out/etc"
3234
35+ install -Dm644 $icon $out/share/pixmaps/pwmt.xpm
3336 mkdir -pv $out/etc
34− echo "set window-icon ${zathura_icon}" > $out/etc/zathurarc
37+ echo "set window-icon $out/share/pixmaps/pwmt.xpm" > $out/etc/zathurarc
38+ echo "Icon=pwmt" >> $out/share/applications/zathura.desktop
3539 '';
3640
37− meta = {
41+ meta = with stdenv.lib; {
3842 homepage = http://pwmt.org/projects/zathura/;
3943 description = "A core component for zathura PDF viewer";
40− license = stdenv.lib.licenses.zlib;
41− platforms = stdenv.lib.platforms.linux;
42− maintainers = [ stdenv.lib.maintainers.garbas ];
43−
44− # Set lower priority in order to provide user with a wrapper script called
45− # 'zathura' instead of real zathura executable. The wrapper will build
46− # plugin path argument before executing the original.
47− priority = 1;
44+ license = licenses.zlib;
45+ platforms = platforms.linux;
46+ maintainers = with maintainers; [ garbas ];
4847 };
4948}