Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Zathura on Darwin #61295

Merged
merged 3 commits into from
May 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pkgs/applications/misc/zathura/core/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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/;
Expand Down
3 changes: 2 additions & 1 deletion pkgs/applications/misc/zathura/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ config, pkgs
, useMupdf ? config.zathura.useMupdf or true
# 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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe make a comment that mupdf plugin is broken on darwin because it can't load a symbol at runtime (I guess from openjpeg?).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah might just be a bad link. Not required for merging, but if you could look at the output of:

$ otool -L /nix/store/27fc303khwdkqkbb3skr7dsrkdmlsld6-zathura-pdf-mupdf-0.3.4/lib/zathura/libpdf-mupdf.dylib

that would be helpful

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/nix/store/bbyhvy2yp7blcaai0cfkkgr59m6647lx-zathura-pdf-mupdf-0.3.4/lib/zathura/libpdf-mupdf.dylib:
        /nix/store/7c3nyrkwsfa2025kcf8v47x5hb0iykqi-girara-0.3.2/lib/libgirara-gtk3.3.dylib (compatibility version 3.0.0, current version 3.0.0)
        /nix/store/fb33y6z6ck2j2jmn69i9z7sbd7bx4iqr-cairo-1.16.0/lib/libcairo.2.dylib (compatibility version 11603.0.0, current version 11603.0.0)
        /nix/store/dj9ljyzlh6yzjpvg7hdm49ym8m7s0b9b-glib-2.60.1/lib/libglib-2.0.0.dylib (compatibility version 6001.0.0, current version 6001.1.0)
        /nix/store/g3c2jpj31bya2x3b8q50f5ix0lgalhgb-Libsystem-osx-10.12.6/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)

, synctexSupport ? true }:

let
Expand Down
4 changes: 1 addition & 3 deletions pkgs/applications/misc/zathura/pdf-mupdf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down