zathura: Enable synctex support

Closes #15984.
abbradar: list is not needed for lib.optional
This commit is contained in:
Alexey Shmalko 2016-06-10 17:04:22 +03:00 committed by Nikolay Amiantov
parent 4fbafb2395
commit b21329e0e0
2 changed files with 10 additions and 4 deletions

View File

@ -1,4 +1,8 @@
{ stdenv, fetchurl, pkgconfig, gtk, girara, ncurses, gettext, docutils, file, makeWrapper, zathura_icon, sqlite, glib }: { stdenv, lib, fetchurl, pkgconfig, gtk, girara, ncurses, gettext, docutils, file, makeWrapper, zathura_icon, sqlite, glib
, synctexSupport ? true, texlive ? null
}:
assert synctexSupport -> texlive != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.3.6"; version = "0.3.6";
@ -9,7 +13,8 @@ stdenv.mkDerivation rec {
sha256 = "0fyb5hak0knqvg90rmdavwcmilhnrwgg1s5ykx9wd3skbpi8nsh8"; sha256 = "0fyb5hak0knqvg90rmdavwcmilhnrwgg1s5ykx9wd3skbpi8nsh8";
}; };
buildInputs = [ pkgconfig file gtk girara gettext makeWrapper sqlite glib ]; buildInputs = [ pkgconfig file gtk girara gettext makeWrapper sqlite glib
] ++ lib.optional synctexSupport texlive.bin.core;
NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
@ -18,7 +23,7 @@ stdenv.mkDerivation rec {
"RSTTOMAN=${docutils}/bin/rst2man.py" "RSTTOMAN=${docutils}/bin/rst2man.py"
"VERBOSE=1" "VERBOSE=1"
"TPUT=${ncurses.out}/bin/tput" "TPUT=${ncurses.out}/bin/tput"
]; ] ++ lib.optional synctexSupport "WITH_SYNCTEX=1";
postInstall = '' postInstall = ''
wrapProgram "$out/bin/zathura" \ wrapProgram "$out/bin/zathura" \

View File

@ -1,4 +1,4 @@
{ callPackage, lib, pkgs, fetchurl, stdenv, useMupdf }: { callPackage, lib, pkgs, fetchurl, stdenv, useMupdf, synctexSupport ? true }:
rec { rec {
inherit stdenv; inherit stdenv;
@ -8,6 +8,7 @@ rec {
zathura_core = callPackage ./core { zathura_core = callPackage ./core {
gtk = pkgs.gtk3; gtk = pkgs.gtk3;
zathura_icon = icon; zathura_icon = icon;
inherit synctexSupport;
}; };
zathura_pdf_poppler = callPackage ./pdf-poppler { }; zathura_pdf_poppler = callPackage ./pdf-poppler { };