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

xpdf doesn't have icons on Darwin #36188

Closed
veprbl opened this issue Mar 1, 2018 · 1 comment
Closed

xpdf doesn't have icons on Darwin #36188

veprbl opened this issue Mar 1, 2018 · 1 comment

Comments

@veprbl
Copy link
Member

veprbl commented Mar 1, 2018

Issue description

missing icons

Steps to reproduce

wget https://nixos.org/\~eelco/pubs/phd-thesis.pdf
nix-shell -p xpdf --run "xpdf phd-thesis.pdf"

Technical details

  • system: "x86_64-darwin"
  • host os: Darwin 16.7.0, macOS 10.12.6
  • multi-user?: no
  • sandbox: no
  • version: nix-env (Nix) 1.11.15
  • nixpkgs: /Users/user/nixpkgs
@veprbl
Copy link
Member Author

veprbl commented Mar 1, 2018

I thought the problem might be due to imageformat plugin not being found, so I try:

diff --git a/pkgs/applications/misc/xpdf/default.nix b/pkgs/applications/misc/xpdf/default.nix
index 42622b62f61..db6c2860868 100644
--- a/pkgs/applications/misc/xpdf/default.nix
+++ b/pkgs/applications/misc/xpdf/default.nix
@@ -38,7 +38,7 @@ stdenv.mkDerivation {

   postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
     wrapProgram $out/bin/xpdf \
-      --set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-*/plugins/platforms
+      --set QT_PLUGIN_PATH ${qtbase.bin}/${qtbase.qtPluginPrefix}
   '';

   meta = {

Result:
missing icons
There is some improvement, but still no icons.

# ls /nix/store/7gi0mjmi457f9l1rif10z5335vjffx60-qtbase-5.10.0-bin/lib/qt-5.10/plugins/imageformats/
libqgif.dylib  libqico.dylib  libqjpeg.dylib

This seems to be same as on Linux.

xpdf seems to use svg:

# ls xpdf-4.00/xpdf-qt
CMakeLists.txt	XpdfViewer.cc	    XpdfWidgetPrint.h  fitPage.svg     icons.qrc		indicator-icon-err4.svg  indicator-icon1.svg  indicator-icon6.svg   xpdf-icon.svg
QtPDFCore.cc	XpdfViewer.h	    back.svg	       fitPageOn.svg   indicator-icon-err0.svg	indicator-icon-err5.svg  indicator-icon2.svg  indicator-icon7.svg   xpdf.cc
QtPDFCore.h	XpdfWidget.cc	    findNext.svg       fitWidth.svg    indicator-icon-err1.svg	indicator-icon-err6.svg  indicator-icon3.svg  selectModeBlock.svg   xpdf.rc
XpdfApp.cc	XpdfWidget.h	    findPrevious.svg   fitWidthOn.svg  indicator-icon-err2.svg	indicator-icon-err7.svg  indicator-icon4.svg  selectModeLinear.svg  zoomIn.svg
XpdfApp.h	XpdfWidgetPrint.cc  findSettings.svg   forward.svg     indicator-icon-err3.svg	indicator-icon0.svg	 indicator-icon5.svg  xpdf-icon.ico	    zoomOut.svg

veprbl added a commit to veprbl/nixpkgs that referenced this issue Mar 1, 2018
On Darwing this fixes icons and "native" look.

Fixes: NixOS#36188
@veprbl veprbl mentioned this issue Mar 1, 2018
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant