From b21329e0e04a7f7a6f37686f75ced7207750885e Mon Sep 17 00:00:00 2001 From: Alexey Shmalko Date: Fri, 10 Jun 2016 17:04:22 +0300 Subject: [PATCH] zathura: Enable synctex support Closes #15984. abbradar: list is not needed for lib.optional --- pkgs/applications/misc/zathura/core/default.nix | 11 ++++++++--- pkgs/applications/misc/zathura/default.nix | 3 ++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix index 0048cb73878..dbb406a23e6 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 0ad3bf2adb9..ed121be6dcd 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 { };