diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix index 0048cb738782..dbb406a23e6c 100644 --- a/pkgs/applications/misc/zathura/core/default.nix +++ b/pkgs/applications/misc/zathura/core/default.nix @@ -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 { version = "0.3.6"; @@ -9,7 +13,8 @@ stdenv.mkDerivation rec { 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"; @@ -18,7 +23,7 @@ stdenv.mkDerivation rec { "RSTTOMAN=${docutils}/bin/rst2man.py" "VERBOSE=1" "TPUT=${ncurses.out}/bin/tput" - ]; + ] ++ lib.optional synctexSupport "WITH_SYNCTEX=1"; postInstall = '' wrapProgram "$out/bin/zathura" \ diff --git a/pkgs/applications/misc/zathura/default.nix b/pkgs/applications/misc/zathura/default.nix index 0ad3bf2adb99..ed121be6dcdb 100644 --- a/pkgs/applications/misc/zathura/default.nix +++ b/pkgs/applications/misc/zathura/default.nix @@ -1,4 +1,4 @@ -{ callPackage, lib, pkgs, fetchurl, stdenv, useMupdf }: +{ callPackage, lib, pkgs, fetchurl, stdenv, useMupdf, synctexSupport ? true }: rec { inherit stdenv; @@ -8,6 +8,7 @@ rec { zathura_core = callPackage ./core { gtk = pkgs.gtk3; zathura_icon = icon; + inherit synctexSupport; }; zathura_pdf_poppler = callPackage ./pdf-poppler { };