From 32b5534f7333a9ab2caf8bda843e97d3e2376298 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Fri, 26 Feb 2021 19:05:25 +0200 Subject: [PATCH] emacs.pkgs.pdf-tools: Remove references to dev outputs in epdfinfo --- .../editors/emacs-modes/melpa-packages.nix | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/emacs-modes/melpa-packages.nix b/pkgs/applications/editors/emacs-modes/melpa-packages.nix index a5e2b7d60523..6a099639d591 100644 --- a/pkgs/applications/editors/emacs-modes/melpa-packages.nix +++ b/pkgs/applications/editors/emacs-modes/melpa-packages.nix @@ -132,9 +132,24 @@ let flycheck-rtags = fix-rtags super.flycheck-rtags; pdf-tools = super.pdf-tools.overrideAttrs (old: { - nativeBuildInputs = [ pkgs.pkg-config ]; - buildInputs = with pkgs; old.buildInputs ++ [ autoconf automake libpng zlib poppler ]; - preBuild = "make server/epdfinfo"; + nativeBuildInputs = [ + pkgs.autoconf + pkgs.automake + pkgs.pkg-config + pkgs.removeReferencesTo + ]; + buildInputs = old.buildInputs ++ [ pkgs.libpng pkgs.zlib pkgs.poppler ]; + preBuild = '' + make server/epdfinfo + remove-references-to \ + -t ${pkgs.stdenv.cc.libc.dev} \ + -t ${pkgs.glib.dev} \ + -t ${pkgs.libpng.dev} \ + -t ${pkgs.poppler.dev} \ + -t ${pkgs.zlib.dev} \ + -t ${pkgs.cairo.dev} \ + server/epdfinfo + ''; recipe = pkgs.writeText "recipe" '' (pdf-tools :repo "politza/pdf-tools" :fetcher github