summary refs log tree commit diff
path: root/pkgs/tools/typesetting
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2017-08-31 21:16:14 +0200
committerVladimír Čunát <vcunat@gmail.com>2017-09-03 10:17:37 +0200
commit828bc3812c9e70692800b703f0c9b123100da7d5 (patch)
tree0bf008c0c720a8504f91171877dc958d0b929293 /pkgs/tools/typesetting
parent89e1245c65d593ee45372307f9470d9f897b9818 (diff)
downloadnixlib-828bc3812c9e70692800b703f0c9b123100da7d5.tar
nixlib-828bc3812c9e70692800b703f0c9b123100da7d5.tar.gz
nixlib-828bc3812c9e70692800b703f0c9b123100da7d5.tar.bz2
nixlib-828bc3812c9e70692800b703f0c9b123100da7d5.tar.lz
nixlib-828bc3812c9e70692800b703f0c9b123100da7d5.tar.xz
nixlib-828bc3812c9e70692800b703f0c9b123100da7d5.tar.zst
nixlib-828bc3812c9e70692800b703f0c9b123100da7d5.zip
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.
Diffstat (limited to 'pkgs/tools/typesetting')
-rw-r--r--pkgs/tools/typesetting/tex/texlive/combine.nix5
-rw-r--r--pkgs/tools/typesetting/tex/texlive/default.nix1
2 files changed, 5 insertions, 1 deletions
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