From d3b28b7fd99e435f5401cbb291b2b6aa2711ad6f Mon Sep 17 00:00:00 2001 From: Vincenzo Mantova <1962985+xworld21@users.noreply.github.com> Date: Sun, 14 May 2023 16:05:22 +0100 Subject: [PATCH] texlive.combine: move repstopdf test to tests.texlive (#231742) --- pkgs/test/texlive/default.nix | 11 +++++++++++ pkgs/tools/typesetting/tex/texlive/combine.nix | 9 --------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/pkgs/test/texlive/default.nix b/pkgs/test/texlive/default.nix index 5e0369f4db47..754358cdf29d 100644 --- a/pkgs/test/texlive/default.nix +++ b/pkgs/test/texlive/default.nix @@ -199,4 +199,15 @@ {"$kpathsea","$schemeFull"/share/texmf-var}/web2c/fmtutil.cnf \ | tee "$out/fmtutil.cnf.patch" ''; + + # verify that the restricted mode gets enabled when + # needed (detected by checking if it disallows --gscmd) + repstopdf = runCommand "texlive-test-repstopdf" { + nativeBuildInputs = [ (texlive.combine { inherit (texlive) scheme-infraonly epstopdf; }) ]; + } '' + ! (epstopdf --gscmd echo /dev/null 2>&1 || true) | grep forbidden >/dev/null + (repstopdf --gscmd echo /dev/null 2>&1 || true) | grep forbidden >/dev/null + mkdir "$out" + ''; + } diff --git a/pkgs/tools/typesetting/tex/texlive/combine.nix b/pkgs/tools/typesetting/tex/texlive/combine.nix index 95c297650483..a22c3b921e84 100644 --- a/pkgs/tools/typesetting/tex/texlive/combine.nix +++ b/pkgs/tools/typesetting/tex/texlive/combine.nix @@ -289,15 +289,6 @@ in (buildEnv { '' rm "$out"/bin/*-sys wrapBin - '' + - # Perform a small test to verify that the restricted mode get enabled when - # needed (detected by checking if it disallows --gscmd) - '' - if [[ -e "$out"/bin/epstopdf ]]; then - echo "Testing restricted mode for {,r}epstopdf" - ! (epstopdf --gscmd echo /dev/null 2>&1 || true) | grep forbidden - (repstopdf --gscmd echo /dev/null 2>&1 || true) | grep forbidden - fi '' + # TODO: a context trigger https://www.preining.info/blog/2015/06/debian-tex-live-2015-the-new-layout/ # http://wiki.contextgarden.net/ConTeXt_Standalone#Unix-like_platforms_.28Linux.2FMacOS_X.2FFreeBSD.2FSolaris.29