mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
Merge pull request #127492 from xworld21/texlive-texdoc-data-tlpdb-lua
texlive.texdoc: build Data.tlpdb.lua
This commit is contained in:
commit
4012bb7603
@ -105,4 +105,18 @@
|
||||
mkdir "$out"
|
||||
mv document*.svg "$out"/
|
||||
'';
|
||||
|
||||
texdoc = runCommandNoCC "texlive-test-texdoc" {
|
||||
nativeBuildInputs = [
|
||||
(with texlive; combine {
|
||||
inherit scheme-infraonly luatex texdoc;
|
||||
pkgFilter = pkg: lib.elem pkg.tlType [ "run" "bin" "doc" ];
|
||||
})
|
||||
];
|
||||
} ''
|
||||
texdoc --version
|
||||
|
||||
texdoc --debug --list texdoc | tee "$out"
|
||||
grep texdoc.pdf "$out"
|
||||
'';
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
, makeWrapper, python3, ruby, perl
|
||||
, useFixedHashes ? true
|
||||
, recurseIntoAttrs
|
||||
, fetchpatch
|
||||
}:
|
||||
let
|
||||
# various binaries (compiled)
|
||||
@ -56,6 +57,37 @@ let
|
||||
collection-plaingeneric = orig.collection-plaingeneric // {
|
||||
deps = orig.collection-plaingeneric.deps // { inherit (tl) xdvi; };
|
||||
};
|
||||
|
||||
texdoc = orig.texdoc // {
|
||||
# build Data.tlpdb.lua (part of the 'tlType == "run"' package)
|
||||
postUnpack = let
|
||||
# commit that ensures reproducibility of Data.tlpdb.lua
|
||||
# remove on the next texdoc update
|
||||
reproPatch = fetchpatch {
|
||||
name = "make-data-tlpdb-lua-reproducible.patch";
|
||||
url = "https://github.com/TeX-Live/texdoc/commit/82aff83d5453a887c1117b9e771a98bddd8a605a.patch";
|
||||
sha256 = "0y04y468i7db4p5bsyyhgzip8q4fi1756x9a15ndha9xfnasbf44";
|
||||
stripLen = 2;
|
||||
extraPrefix = "scripts/texdoc/";
|
||||
};
|
||||
in ''
|
||||
if [[ -f "$out"/scripts/texdoc/texdoc.tlu ]]; then
|
||||
patch -p1 -d "$out" < "${reproPatch}"
|
||||
|
||||
unxz --stdout "${tlpdb}" > texlive.tlpdb
|
||||
|
||||
# create dummy doc file to ensure that texdoc does not return an error
|
||||
mkdir -p support/texdoc
|
||||
touch support/texdoc/NEWS
|
||||
|
||||
TEXMFCNF="${bin.core}"/share/texmf-dist/web2c TEXMF="$out" TEXDOCS=. TEXMFVAR=. \
|
||||
"${bin.luatex}"/bin/texlua "$out"/scripts/texdoc/texdoc.tlu \
|
||||
-c texlive_tlpdb=texlive.tlpdb -lM texdoc
|
||||
|
||||
cp texdoc/cache-tlpdb.lua "$out"/scripts/texdoc/Data.tlpdb.lua
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}); # overrides
|
||||
|
||||
# tl =
|
||||
@ -93,6 +125,16 @@ let
|
||||
day = "08";
|
||||
};
|
||||
|
||||
tlpdb = fetchurl {
|
||||
# use the same mirror(s) as urlPrefixes below
|
||||
urls = [
|
||||
#"http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2019/tlnet-final/tlpkg/texlive.tlpdb.xz"
|
||||
#"ftp://tug.org/texlive/historic/2019/tlnet-final/tlpkg/texlive.tlpdb.xz"
|
||||
"https://texlive.info/tlnet-archive/${snapshot.year}/${snapshot.month}/${snapshot.day}/tlnet/tlpkg/texlive.tlpdb.xz"
|
||||
];
|
||||
sha512 = "1dsj4bza84g2f2z0w31yil3iwcnggcyg9f1xxwmp6ljk5xlzyr39cb556prx9691zbwpbrwbb5hnbqxqlnwsivgk0pmbl9mbjbk9cz0";
|
||||
};
|
||||
|
||||
# create a derivation that contains an unpacked upstream TL package
|
||||
mkPkg = { pname, tlType, revision, version, sha512, postUnpack ? "", stripPrefix ? 1, ... }@args:
|
||||
let
|
||||
|
@ -729,7 +729,7 @@
|
||||
"texdiff.doc-0.4"="r9wsmivjyiwdnav7qc35kydk9b8pbcz8";
|
||||
"texdirflatten-1.3"="135358h2mb608wg3ni93rrsvvqgxm4ya";
|
||||
"texdirflatten.doc-1.3"="n9jxdwjiylvwy6n55vgci9a32qi10xhl";
|
||||
"texdoc-3.3"="3sjc6kp2l1p97qnhqqby5qcahcfj8irf";
|
||||
"texdoc-3.3"="zybis3ds27vzr62qsvkmph787jb12msz";
|
||||
"texdoc.doc-3.3"="ri2jcsh0ja8wmjs9y9692m0zc0z8gxvi";
|
||||
"texdoctk-0.6.0"="p6c2lakbnbg1wdc7i4iavscn9k0xamw5";
|
||||
"texdoctk.doc-0.6.0"="xfl4g9m6d9nbn4f9hgxj58jg9g4laa7l";
|
||||
|
Loading…
Reference in New Issue
Block a user