From 828bc3812c9e70692800b703f0c9b123100da7d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 31 Aug 2017 21:16:14 +0200 Subject: [PATCH] texlive: add ghostscript when containing pdfcrop Potential disadvantage: ghostscript will become visible to user, so there may e.g. be (new) collisions in nix-env due to this. Fixes #28411. --- pkgs/tools/typesetting/tex/texlive/combine.nix | 5 ++++- pkgs/tools/typesetting/tex/texlive/default.nix | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/typesetting/tex/texlive/combine.nix b/pkgs/tools/typesetting/tex/texlive/combine.nix index 9af1d6a59ffd..390b7b9e5e00 100644 --- a/pkgs/tools/typesetting/tex/texlive/combine.nix +++ b/pkgs/tools/typesetting/tex/texlive/combine.nix @@ -15,7 +15,10 @@ let pkgList = rec { all = lib.filter pkgFilter (combinePkgs pkgSet); splitBin = lib.partition (p: p.tlType == "bin") all; - bin = mkUniquePkgs splitBin.right; + bin = mkUniquePkgs splitBin.right + ++ lib.optional + (lib.any (p: p.tlType == "run" && p.pname == "pdfcrop") splitBin.wrong) + (lib.getBin ghostscript); nonbin = mkUniquePkgs splitBin.wrong; # extra interpreters needed for shebangs, based on 2015 schemes "medium" and "tetex" diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix index 13eb90c77af3..7665d277e38f 100644 --- a/pkgs/tools/typesetting/tex/texlive/default.nix +++ b/pkgs/tools/typesetting/tex/texlive/default.nix @@ -30,6 +30,7 @@ let inherit bin combinePkgs buildEnv fastUnique lib makeWrapper writeText stdenv python ruby; perl = perl522; # avoid issues like #26890, probably remove after texlive upgrade + ghostscript = ghostscriptX; # could be without X, probably, but we use X above }; # the set of TeX Live packages, collections, and schemes; using upstream naming