Merge pull request #82199 from veprbl/pr/texlive_2019_final
texlive: 2019 -> 2019-final
This commit is contained in:
commit
359de1d416
@ -10,13 +10,12 @@ perlPackages.buildPerlModule {
|
||||
|
||||
src = "${biberSource}/source/bibtex/biber/biblatex-biber.tar.gz";
|
||||
|
||||
# TODO: remove TextBibTeX for biber 2.14: https://github.com/plk/biber/blob/dev/Changes
|
||||
buildInputs = with perlPackages; [
|
||||
autovivification BusinessISBN BusinessISMN BusinessISSN ConfigAutoConf
|
||||
DataCompare DataDump DateSimple EncodeEUCJPASCII EncodeHanExtra EncodeJIS2K
|
||||
DateTime DateTimeFormatBuilder DateTimeCalendarJulian
|
||||
ExtUtilsLibBuilder FileSlurper FileWhich IPCRun3 LogLog4perl LWPProtocolHttps ListAllUtils
|
||||
ListMoreUtils MozillaCA IOString ReadonlyXS RegexpCommon TextBibTeX
|
||||
ListMoreUtils MozillaCA ParseRecDescent IOString ReadonlyXS RegexpCommon TextBibTeX
|
||||
UnicodeLineBreak URI XMLLibXMLSimple XMLLibXSLT XMLWriter
|
||||
ClassAccessor TextCSV TextCSV_XS TextRoman DataUniqid LinguaTranslit SortKey
|
||||
TestDifferences
|
||||
|
@ -58,10 +58,9 @@ mv fixedHashes.nix fixedHashes-old.nix
|
||||
# start with empty fixedHashes
|
||||
echo '{}' > fixedHashes.nix
|
||||
|
||||
nix-build ../../../../.. -Q --no-out-link -A texlive.scheme-full.pkgs | ./fixHashes.sh > ./fixedHashes-new.nix
|
||||
nix-build ../../../../.. -Q --no-out-link -A texlive.scheme-full.pkgs | ./fixHashes.awk > ./fixedHashes-new.nix
|
||||
|
||||
# The script wrongly includes the nix store path to `biber`, which is a separate nixpkgs package
|
||||
grep -v -F '/nix/store/' fixedHashes-new.nix > fixedHashes.nix
|
||||
mv fixedHashes-new.nix fixedHashes.nix
|
||||
```
|
||||
|
||||
### Commit changes
|
||||
|
@ -399,6 +399,27 @@ pygmentex = python2Packages.buildPythonApplication rec {
|
||||
};
|
||||
|
||||
|
||||
texlinks = stdenv.mkDerivation rec {
|
||||
name = "texlinks.sh";
|
||||
|
||||
src = stdenv.lib.head (builtins.filter (p: p.tlType == "run") texlive.texlive-scripts-extra.pkgs);
|
||||
|
||||
dontBuild = true;
|
||||
doCheck = false;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
# 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"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
inherit biber;
|
||||
bibtexu = bibtex8;
|
||||
bibtex8 = stdenv.mkDerivation {
|
||||
|
@ -68,24 +68,13 @@ in buildEnv {
|
||||
'')
|
||||
pkgList.bin
|
||||
+
|
||||
|
||||
# Patch texlinks.sh back to 2015 version;
|
||||
# otherwise some bin/ links break, e.g. xe(la)tex.
|
||||
''
|
||||
(
|
||||
cd "$out/share/texmf/scripts/texlive"
|
||||
local target="$(readlink texlinks.sh)"
|
||||
rm texlinks.sh && cp "$target" texlinks.sh
|
||||
patch --verbose -R texlinks.sh < '${./texlinks.diff}'
|
||||
)
|
||||
'' +
|
||||
''
|
||||
export PATH="$out/bin:$out/share/texmf/scripts/texlive:${perl}/bin:$PATH"
|
||||
export TEXMFCNF="$out/share/texmf/web2c"
|
||||
export TEXMFDIST="$out/share/texmf"
|
||||
export TEXMFSYSCONFIG="$out/share/texmf-config"
|
||||
export TEXMFSYSVAR="$out/share/texmf-var"
|
||||
export PERL5LIB="$out/share/texmf/scripts/texlive"
|
||||
export PERL5LIB="$out/share/texmf/scripts/texlive:${bin.core.out}/share/texmf-dist/scripts/texlive"
|
||||
'' +
|
||||
# patch texmf-dist -> $out/share/texmf
|
||||
# patch texmf-local -> $out/share/texmf-local
|
||||
@ -164,7 +153,7 @@ in buildEnv {
|
||||
rm "$link"
|
||||
makeWrapper "$target" "$link" \
|
||||
--prefix PATH : "$out/bin:${perl}/bin" \
|
||||
--prefix PERL5LIB : "$out/share/texmf/scripts/texlive"
|
||||
--prefix PERL5LIB : "$PERL5LIB"
|
||||
|
||||
# avoid using non-nix shebang in $target by calling interpreter
|
||||
if [[ "$(head -c 2 "$target")" = "#!" ]]; then
|
||||
@ -194,9 +183,6 @@ in buildEnv {
|
||||
'' +
|
||||
# texlive post-install actions
|
||||
''
|
||||
mkdir -p "$out/share/texmf/scripts/texlive/"
|
||||
ln -s '${bin.core.out}/share/texmf-dist/scripts/texlive/TeXLive' "$out/share/texmf/scripts/texlive/"
|
||||
|
||||
for tool in updmap; do
|
||||
ln -sf "$out/share/texmf/scripts/texlive/$tool."* "$out/bin/$tool"
|
||||
done
|
||||
@ -209,9 +195,9 @@ in buildEnv {
|
||||
ln -sf fmtutil "$out/bin/mktexfmt"
|
||||
|
||||
perl `type -P mktexlsr.pl` ./share/texmf
|
||||
texlinks.sh "$out/bin" && wrapBin
|
||||
${bin.texlinks} "$out/bin" && wrapBin
|
||||
(perl `type -P fmtutil.pl` --sys --all || true) | grep '^fmtutil' # too verbose
|
||||
#texlinks.sh "$out/bin" && wrapBin # do we need to regenerate format links?
|
||||
#${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
|
||||
|
@ -89,7 +89,7 @@ let
|
||||
};
|
||||
|
||||
# create a derivation that contains an unpacked upstream TL package
|
||||
mkPkg = { pname, tlType, version, sha512, postUnpack ? "", stripPrefix ? 1, ... }@args:
|
||||
mkPkg = { pname, tlType, revision, version, sha512, postUnpack ? "", stripPrefix ? 1, ... }@args:
|
||||
let
|
||||
# the basename used by upstream (without ".tar.xz" suffix)
|
||||
urlName = pname + lib.optionalString (tlType != "run") ".${tlType}";
|
||||
@ -97,8 +97,12 @@ let
|
||||
fixedHash = fixedHashes.${tlName} or null; # be graceful about missing hashes
|
||||
|
||||
urls = args.urls or (if args ? url then [ args.url ] else
|
||||
map (up: "${up}/${urlName}.tar.xz") urlPrefixes
|
||||
);
|
||||
lib.concatMap
|
||||
(up: [
|
||||
"${up}/${urlName}.r${toString revision}.tar.xz"
|
||||
"${up}/${urlName}.tar.xz" # TODO To be removed for telive 2020
|
||||
])
|
||||
urlPrefixes);
|
||||
|
||||
# The tarballs on CTAN mirrors for the current release are constantly
|
||||
# receiving updates, so we can't use those directly. Stable snapshots
|
||||
@ -106,15 +110,12 @@ let
|
||||
# should be switching to the tlnet-final versions
|
||||
# (https://tug.org/historic/).
|
||||
urlPrefixes = args.urlPrefixes or [
|
||||
# Snapshots hosted by one of the texlive release managers
|
||||
https://texlive.info/tlnet-archive/2019/10/19/tlnet/archive
|
||||
# tlnet-final snapshot
|
||||
http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2019/tlnet-final/archive
|
||||
ftp://tug.org/texlive/historic/2019/tlnet-final/archive
|
||||
|
||||
# Mirror hosted by @veprbl
|
||||
http://146.185.144.154/texlive-2019
|
||||
|
||||
# TODO: Upgrade to the final snapshot of the packages before 20.03
|
||||
#http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2019/tlnet-final/archive
|
||||
#ftp://tug.org/texlive/historic/2019/tlnet-final/archive
|
||||
# Daily snapshots hosted by one of the texlive release managers
|
||||
#https://texlive.info/tlnet-archive/2019/10/19/tlnet/archive
|
||||
];
|
||||
|
||||
src = fetchurl { inherit urls sha512; };
|
||||
|
24
pkgs/tools/typesetting/tex/texlive/fixHashes.awk
Executable file
24
pkgs/tools/typesetting/tex/texlive/fixHashes.awk
Executable file
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i "gawk -f" -p gawk
|
||||
|
||||
BEGIN {
|
||||
print "{"
|
||||
}
|
||||
|
||||
/-texlive-/ && !/\.bin/ {
|
||||
if (match($0, /-texlive-([^\/]*)/, m) == 0) {
|
||||
print "No match for \""$0"\"" > "/dev/stderr"
|
||||
exit 1
|
||||
}
|
||||
cmd="nix-hash --type sha1 --base32 "$0
|
||||
if (( cmd | getline hash ) <= 0) {
|
||||
print "Error executing nix-hash" > "/dev/stderr"
|
||||
exit 1
|
||||
}
|
||||
close(cmd)
|
||||
printf("\"%s\"=\"%s\";\n", m[1], hash)
|
||||
}
|
||||
|
||||
END {
|
||||
print "}"
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "{"
|
||||
grep -v -F '.bin-' | while read path; do
|
||||
hash=`nix-hash --type sha1 --base32 "$path"`
|
||||
echo -n "$path" | sed -E 's/[^-]*-texlive-(.*)/"\1"/'
|
||||
echo "=\"$hash\";"
|
||||
done
|
||||
echo "}"
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -8,6 +8,9 @@ $a}
|
||||
# quote package names, as some start with a number :-/
|
||||
s/^name (.*)/name "\1"/
|
||||
|
||||
# extract revision
|
||||
s/^revision ([0-9]*)$/ revision = \1;/p
|
||||
|
||||
# form an attrmap per package
|
||||
/^name /s/^name (.*)/\1 = {/p
|
||||
/^$/,1i};
|
||||
|
Loading…
Reference in New Issue
Block a user