From 44f0488ff20b0219f0174d9075bf94a0fd6f9fa1 Mon Sep 17 00:00:00 2001 From: Vincenzo Mantova <1962985+xworld21@users.noreply.github.com> Date: Sat, 27 May 2023 09:56:54 +0100 Subject: [PATCH] advi: use ghostscriptX instead of gs discovered at build time --- pkgs/tools/typesetting/tex/advi/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/typesetting/tex/advi/default.nix b/pkgs/tools/typesetting/tex/advi/default.nix index 8fb8702213c3..1b69270a3f4f 100644 --- a/pkgs/tools/typesetting/tex/advi/default.nix +++ b/pkgs/tools/typesetting/tex/advi/default.nix @@ -45,6 +45,8 @@ ocamlPackages.buildDunePackage rec { substituteInPlace ./Makefile \ --replace "\$(DUNE) install \$(DUNEROOT) --display=short" \ "\$(DUNE) install \$(DUNEROOT) --prefix $out --docdir $out/share/doc --mandir $out/share/man" + substituteInPlace ./src/discover.sh \ + --replace 'gs_path=$(which gs)' 'gs_path=${ghostscriptX}/bin/gs' ''; duneVersion = "3"; @@ -52,10 +54,9 @@ ocamlPackages.buildDunePackage rec { nativeBuildInputs = [ fake-opam kpsexpand makeWrapper texlive.combined.scheme-medium which ]; buildInputs = with ocamlPackages; [ camlimages ghostscriptX graphics ]; - # TODO: ghostscript linked from texlive.combine will override ghostscriptX and break advi + # install additional files (such as man pages) preInstall = '' make install - wrapProgram "$out/bin/advi" --prefix PATH : "${lib.makeBinPath [ ghostscriptX ]}" ''; # TODO: redirect /share/advi/tex/latex to tex output compatible with texlive.combine