Skip to content

Commit

Permalink
mupdf: fix bin libmupdf.dylib loading on darwin
Browse files Browse the repository at this point in the history
(cherry picked from commit 11498ae)
  • Loading branch information
lilyinstarlight authored and github-actions[bot] committed Dec 13, 2023
1 parent d76bdb6 commit 851337e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkgs/applications/misc/mupdf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,14 @@ stdenv.mkDerivation rec {
EOF
moveToOutput "bin" "$bin"
'' + lib.optionalString (enableX11 || enableGL) ''
'' + (lib.optionalString (stdenv.isDarwin) ''
for exe in $bin/bin/*; do
install_name_tool -change build/shared-release/libmupdf.dylib $out/lib/libmupdf.dylib "$exe"
done
'') + (lib.optionalString (enableX11 || enableGL) ''
mkdir -p $bin/share/icons/hicolor/48x48/apps
cp docs/logo/mupdf.png $bin/share/icons/hicolor/48x48/apps
'' + (if enableGL then ''
'') + (if enableGL then ''
ln -s "$bin/bin/mupdf-gl" "$bin/bin/mupdf"
'' else lib.optionalString (enableX11) ''
ln -s "$bin/bin/mupdf-x11" "$bin/bin/mupdf"
Expand Down

0 comments on commit 851337e

Please sign in to comment.