Skip to content

Instantly share code, notes, and snippets.

@whacked
Last active August 19, 2019 03:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whacked/9a4fb4134556ccb46baf25a4f120e387 to your computer and use it in GitHub Desktop.
Save whacked/9a4fb4134556ccb46baf25a4f120e387 to your computer and use it in GitHub Desktop.
attempt a quick fix for broken epdfinfo in pdf-tools for nix-provided emacs
# ref https://www.reddit.com/r/NixOS/comments/6dvm04/how_to_install_emacs_pdftools_with_epdfinfo/di5yii9/
# git clone https://github.com/politza/pdf-tools
# run this from within
# then M-x package-install-file
# select the .tar from the `make` output; the epdfinfo is broken.
# then cp the patchelf-ed version into emacs
with (import <nixpkgs> {});
stdenv.mkDerivation {
name = "pdf-tools";
buildInputs = [
stdenv
cask
pkgconfig
autoconf
automake
libpng
zlib
poppler
poppler_gi
];
shellHook = ''
make
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
server/epdfinfo
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment