texlive.bin.texlinks: fix build for darwin sandbox

post-installation fixup
    strip is /nix/store/falx4gakl6k1q64aqr4f8mvy8vfqcqaq-cctools-binutils-darwin-949.0.1/bin/strip
    patching script interpreter paths in /nix/store/q1haqqnh6i2677ihad4673gc3slna3sw-texlinks.sh
    /nix/store/q1haqqnh6i2677ihad4673gc3slna3sw-texlinks.sh: interpreter directive changed from "#!/bin/sh" to "/nix/store/715y5lnw12vdcc3hh9sc9vbkdi6c83x6-bash-4.4-p23/bin/sh"
    sed: couldn't open temporary file /nix/store/sedqPf2C0: Operation not permitted
This commit is contained in:
Dmitry Kalinkin 2021-12-29 02:07:36 -05:00
parent 4abd29bc06
commit 7660d567dd
No known key found for this signature in database
GPG Key ID: 5157B3EC8B2CA333
2 changed files with 5 additions and 5 deletions

View File

@ -104,7 +104,7 @@ core = stdenv.mkDerivation rec {
# TODO: perhaps improve texmf.cnf search locations
postInstall = /* links format -> engine will be regenerated in texlive.combine */ ''
PATH="$out/bin:$PATH" ${texlinks} --cnffile "$out/share/texmf-dist/web2c/fmtutil.cnf" --unlink "$out/bin"
PATH="$out/bin:$PATH" ${texlinks}/bin/texlinks --cnffile "$out/share/texmf-dist/web2c/fmtutil.cnf" --unlink "$out/bin"
'' + /* a few texmf-dist files are useful; take the rest from pkgs */ ''
mv "$out/share/texmf-dist/web2c/texmf.cnf" .
rm -r "$out/share/texmf-dist"
@ -360,7 +360,7 @@ pygmentex = python3Packages.buildPythonApplication rec {
texlinks = stdenv.mkDerivation rec {
name = "texlinks.sh";
name = "texlinks";
src = lib.head (builtins.filter (p: p.tlType == "run") texlive.texlive-scripts-extra.pkgs);
@ -373,7 +373,7 @@ texlinks = stdenv.mkDerivation rec {
# Patch texlinks.sh back to 2015 version;
# otherwise some bin/ links break, e.g. xe(la)tex.
patch --verbose -R scripts/texlive-extra/texlinks.sh < '${./texlinks.diff}'
install -Dm555 scripts/texlive-extra/texlinks.sh "$out"
install -Dm555 scripts/texlive-extra/texlinks.sh "$out"/bin/texlinks
runHook postInstall
'';

View File

@ -224,9 +224,9 @@ in (buildEnv {
ln -sf fmtutil "$out/bin/mktexfmt"
perl `type -P mktexlsr.pl` ./share/texmf
${bin.texlinks} "$out/bin" && wrapBin
${bin.texlinks}/bin/texlinks "$out/bin" && wrapBin
perl `type -P fmtutil.pl` --sys --all | grep '^fmtutil' # too verbose
#${bin.texlinks} "$out/bin" && wrapBin # do we need to regenerate format links?
#${bin.texlinks}/bin/texlinks "$out/bin" && wrapBin # do we need to regenerate format links?
# Disable unavailable map files
echo y | perl `type -P updmap.pl` --sys --syncwithtrees --force