From a2f3f6881bafbf356210ff24203eee74e9a02a72 Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Sun, 3 Mar 2019 22:29:52 +0100 Subject: [PATCH 1/3] zathura: fix darwin builds --- pkgs/applications/misc/zathura/core/default.nix | 10 +++++----- pkgs/applications/misc/zathura/pdf-mupdf/default.nix | 4 +--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix index f3258c0c7116..6378cf1c0681 100644 --- a/pkgs/applications/misc/zathura/core/default.nix +++ b/pkgs/applications/misc/zathura/core/default.nix @@ -32,15 +32,15 @@ stdenv.mkDerivation rec { ] ++ optional synctexSupport "-Dsynctex=enabled"; nativeBuildInputs = [ - meson ninja pkgconfig appstream-glib desktop-file-utils python3.pkgs.sphinx + meson ninja pkgconfig desktop-file-utils python3.pkgs.sphinx gettext makeWrapper libxml2 - ]; + ] ++ optional stdenv.isLinux appstream-glib; buildInputs = [ - gtk girara libintl libseccomp - sqlite glib file librsvg + gtk girara libintl sqlite glib file librsvg ] ++ optional synctexSupport texlive.bin.core - ++ optional stdenv.isDarwin [ gtk-mac-integration ]; + ++ optional stdenv.isLinux libseccomp + ++ optional stdenv.isDarwin gtk-mac-integration; meta = { homepage = https://pwmt.org/projects/zathura/; diff --git a/pkgs/applications/misc/zathura/pdf-mupdf/default.nix b/pkgs/applications/misc/zathura/pdf-mupdf/default.nix index 709c1edb0b83..e2c08a00da20 100644 --- a/pkgs/applications/misc/zathura/pdf-mupdf/default.nix +++ b/pkgs/applications/misc/zathura/pdf-mupdf/default.nix @@ -21,9 +21,7 @@ stdenv.mkDerivation rec { buildInputs = [ zathura_core girara mupdf cairo - ] ++ stdenv.lib.optional stdenv.isDarwin [ - gtk-mac-integration - ]; + ] ++ lib.optional stdenv.isDarwin gtk-mac-integration; PKG_CONFIG_ZATHURA_PLUGINDIR= "lib/zathura"; From 9ddd56a7e30442c0031d17eb2f5bfb931bcabc8b Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Sat, 11 May 2019 15:53:40 +0200 Subject: [PATCH 2/3] zathura: use poppler on Darwin by default --- pkgs/applications/misc/zathura/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/misc/zathura/default.nix b/pkgs/applications/misc/zathura/default.nix index dfddfe7d91e1..9fdfa2d49d1a 100644 --- a/pkgs/applications/misc/zathura/default.nix +++ b/pkgs/applications/misc/zathura/default.nix @@ -1,5 +1,5 @@ { config, pkgs -, useMupdf ? config.zathura.useMupdf or true +, useMupdf ? config.zathura.useMupdf or (!pkgs.stdenv.isDarwin) , synctexSupport ? true }: let From 4afa4cda632d8e2530d217e98e72300d55b60347 Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Sat, 11 May 2019 23:42:58 +0200 Subject: [PATCH 3/3] zathura: Add a comment about why poppler is used on Darwin --- pkgs/applications/misc/zathura/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/misc/zathura/default.nix b/pkgs/applications/misc/zathura/default.nix index 9fdfa2d49d1a..e3db15ca78d4 100644 --- a/pkgs/applications/misc/zathura/default.nix +++ b/pkgs/applications/misc/zathura/default.nix @@ -1,4 +1,5 @@ { config, pkgs +# zathura_pdf_mupdf fails to load _opj_create_decompress at runtime on Darwin (https://github.com/NixOS/nixpkgs/pull/61295#issue-277982980) , useMupdf ? config.zathura.useMupdf or (!pkgs.stdenv.isDarwin) , synctexSupport ? true }: