diff options
Diffstat (limited to 'pkgs/tools/typesetting/tex/texlive/aggregate.nix')
-rw-r--r-- | pkgs/tools/typesetting/tex/texlive/aggregate.nix | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/pkgs/tools/typesetting/tex/texlive/aggregate.nix b/pkgs/tools/typesetting/tex/texlive/aggregate.nix index 84fa1cfab75a..2d1de93fed87 100644 --- a/pkgs/tools/typesetting/tex/texlive/aggregate.nix +++ b/pkgs/tools/typesetting/tex/texlive/aggregate.nix @@ -3,6 +3,7 @@ rec { name = "TeXLive-linkdir"; buildInputs = lib.closePropagation paths + ++ [perl] ++ stdenv.lib.optional stdenv.isDarwin makeWrapper; phaseNames = [ "doAggregate" ]; @@ -11,12 +12,15 @@ rec { mkdir -p $out/bin for currentPath in ${lib.concatStringsSep " " buildInputs}; do echo Symlinking "$currentPath" + find $currentPath/share/info $currentPath/share/man $(echo $currentPath/texmf*/) -type d | while read; do + REPLY="''${REPLY#$currentPath}" + mkdir -p $out/"$REPLY" + done find $currentPath/share/info $currentPath/share/man $(echo $currentPath/texmf*/) ! -type d | while read; do REPLY="''${REPLY#$currentPath}" - mkdir -p $out/"$(dirname "$REPLY")" ln -fs $currentPath/"$REPLY" $out/"$REPLY" echo - done | while read; do head -n 99 >/dev/null; echo -n .; done + done | while read; do head -n 999 >/dev/null; echo -n .; done for i in "$currentPath/bin/"* :; do test "$i" != : || continue @@ -31,8 +35,8 @@ rec { ln -s $out/texmf* $out/share/ - rm -r $out/texmf-config - find $out/texmf/ -type d | while read; do + rm -rf $out/texmf-config + find $out/texmf*/ -type d | while read; do REPLY="''${REPLY#$out/texmf}" mkdir -p $out/texmf-config/"$REPLY" done @@ -45,9 +49,10 @@ rec { chmod a+x $out/bin/$(basename $i) done - rm $out/texmf*/ls-R + rm -f $out/texmf*/ls-R for i in web2c texconfig fonts/map; do - cp -Lr $out/texmf/$i/* $out/texmf-config/$i || true + mkdir -p $out/texmf-config/$i + cp -Lr $out/texmf*/$i/* $out/texmf-config/$i || true done chmod -R u+w $out/texmf-config |