diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2015-10-24 12:09:45 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2015-10-24 12:09:45 +0200 |
commit | 1d640f029f3c9de3d049f0c0a9b7280592fce5db (patch) | |
tree | 487168851a539583dd9b8199029e52a7c66d04ee /pkgs/tools/typesetting/tex/texlive-new | |
parent | 489e947a5184fc6ec9d95a91373024ddffbc4955 (diff) | |
download | nixpkgs-1d640f029f3c9de3d049f0c0a9b7280592fce5db.tar nixpkgs-1d640f029f3c9de3d049f0c0a9b7280592fce5db.tar.gz nixpkgs-1d640f029f3c9de3d049f0c0a9b7280592fce5db.tar.bz2 nixpkgs-1d640f029f3c9de3d049f0c0a9b7280592fce5db.tar.lz nixpkgs-1d640f029f3c9de3d049f0c0a9b7280592fce5db.tar.xz nixpkgs-1d640f029f3c9de3d049f0c0a9b7280592fce5db.tar.zst nixpkgs-1d640f029f3c9de3d049f0c0a9b7280592fce5db.zip |
texlive: avoid huge command lines
/cc #9757.
Diffstat (limited to 'pkgs/tools/typesetting/tex/texlive-new')
-rw-r--r-- | pkgs/tools/typesetting/tex/texlive-new/combine.nix | 14 | ||||
-rw-r--r-- | pkgs/tools/typesetting/tex/texlive-new/default.nix | 5 |
2 files changed, 10 insertions, 9 deletions
diff --git a/pkgs/tools/typesetting/tex/texlive-new/combine.nix b/pkgs/tools/typesetting/tex/texlive-new/combine.nix index 2c9119b934f..e69c6ec425c 100644 --- a/pkgs/tools/typesetting/tex/texlive-new/combine.nix +++ b/pkgs/tools/typesetting/tex/texlive-new/combine.nix @@ -82,21 +82,21 @@ in buildEnv { # updmap.cfg seems like not needing changes # now filter hyphenation patterns, in a hacky way ATM - '' + (let script = + writeText "hyphens.sed" ( + lib.concatMapStrings (pkg: "/^\% from ${pkg.pname}/,/^\%/p;\n") pkgList.splitBin.wrong + + "1,/^\% from/p;" ); + in '' ( - local script='${ - lib.concatMapStrings (pkg: "/^\% from ${pkg.pname}/,/^\%/p;\n") - pkgList.splitBin.wrong - } 1,/^\% from/p;' cd ./share/texmf/tex/generic/config/ for fname in language.dat language.def; do [ -e $fname ] || continue; cnfOrig="$(realpath ./$fname)" rm ./$fname - cat "$cnfOrig" | sed -n "$script" > ./$fname + cat "$cnfOrig" | sed -n -f '${script}' > ./$fname done ) - '' + + '') + # function to wrap created executables with required env vars '' diff --git a/pkgs/tools/typesetting/tex/texlive-new/default.nix b/pkgs/tools/typesetting/tex/texlive-new/default.nix index c8b2a414fa3..a084c973b78 100644 --- a/pkgs/tools/typesetting/tex/texlive-new/default.nix +++ b/pkgs/tools/typesetting/tex/texlive-new/default.nix @@ -24,7 +24,7 @@ * in case of any bugs or feature requests, file a github issue and /cc @vcunat */ -{ stdenv, lib, fetchurl, runCommand, buildEnv +{ stdenv, lib, fetchurl, runCommand, writeText, buildEnv , callPackage, ghostscriptX, harfbuzz, poppler_min , makeWrapper, perl, python, ruby , useFixedHashes ? true @@ -48,7 +48,8 @@ let # function for creating a working environment from a set of TL packages combine = import ./combine.nix { - inherit bin combinePkgs buildEnv fastUnique lib makeWrapper perl stdenv python ruby; + inherit bin combinePkgs buildEnv fastUnique lib makeWrapper writeText + perl stdenv python ruby; }; # the set of TeX Live packages, collections, and schemes; using upstream naming |