texlive: rename pkgs.nix to tlpdb.nix and generate it from Nixpkgs attribute
This commit is contained in:
parent
76c861aaab
commit
76e92ae984
@ -33,20 +33,29 @@ See https://tug.org/texlive/acquire-mirror.html for instructions.
|
||||
|
||||
### Upgrade package information from texlive package database
|
||||
|
||||
First, edit `default.nix` as follows.
|
||||
|
||||
If upgrading to a daily snapshot:
|
||||
- change `snapshot.year`, `snapshot.month`, `snapshot.day`;
|
||||
- ensure `urlPrefixes` uses the https://texlive.info/tlnet-archive mirror;
|
||||
- ensure `texlive.extraVersion` uses the `snapshot` info.
|
||||
|
||||
If upgrading to a final release:
|
||||
- upgrade `texlive.bin` first;
|
||||
- ensure `urlPrefixes` uses the historic mirrors;
|
||||
- ensure `texlive.extraVersion` is `"-final"`.
|
||||
|
||||
Then upgrade `tlpdb.hash` to match the new hash of `texlive.tlpdb.xz` and run
|
||||
|
||||
```bash
|
||||
curl -L https://texlive.info/tlnet-archive/$YEAR/$MONTH/$DAY/tlnet/tlpkg/texlive.tlpdb.xz \
|
||||
| xzcat | sed -rn -f ./tl2nix.sed | uniq > ./pkgs.nix
|
||||
nix-build ../../../../.. -A texlive.tlpdb-nix --no-out-link
|
||||
```
|
||||
|
||||
This will download the daily snapshot of the CTAN package database `texlive.tlpdb.xz`
|
||||
and regenerate all of the sha512 hashes for the current upstream distribution in `pkgs.nix`.
|
||||
This will download the daily snapshot of the CTAN package database
|
||||
`texlive.tlpdb.xz` and extract the relevant package info (including version
|
||||
numbers and sha512 hashes) for the selected upstream distribution. Then replace
|
||||
`tlpdb.nix` with the generated file.
|
||||
|
||||
Use the url
|
||||
|
||||
https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/$YEAR/tlnet-final/tlpkg/texlive.tlpdb.xz
|
||||
|
||||
for the final TeX Live release.
|
||||
|
||||
### Build packages locally and generate fix hashes
|
||||
|
||||
|
@ -30,7 +30,7 @@ let
|
||||
|
||||
# the set of TeX Live packages, collections, and schemes; using upstream naming
|
||||
tl = let
|
||||
orig = import ./pkgs.nix;
|
||||
orig = import ./tlpdb.nix;
|
||||
removeSelfDep = lib.mapAttrs
|
||||
(n: p: if p ? deps then p // { deps = lib.filter (dn: n != dn) p.deps; }
|
||||
else p);
|
||||
@ -146,6 +146,14 @@ let
|
||||
hash = "sha256-i8DE3/rZmtp+gODJWeHV1VcCK5cgHUgmywf3Q/agTOA=";
|
||||
};
|
||||
|
||||
tlpdb-nix = runCommand "tlpdb.nix" {
|
||||
inherit tlpdb;
|
||||
tl2nix = ./tl2nix.sed;
|
||||
}
|
||||
''
|
||||
xzcat "$tlpdb" | sed -rn -f "$tl2nix" | uniq > "$out"
|
||||
'';
|
||||
|
||||
# create a derivation that contains an unpacked upstream TL package
|
||||
mkPkg = { pname, tlType, revision, version, sha512, postUnpack ? "", stripPrefix ? 1, ... }@args:
|
||||
let
|
||||
@ -187,7 +195,7 @@ let
|
||||
|
||||
in
|
||||
tl // {
|
||||
inherit bin combine;
|
||||
inherit bin combine tlpdb-nix;
|
||||
|
||||
# Pre-defined combined packages for TeX Live schemes,
|
||||
# to make nix-env usage more comfortable and build selected on Hydra.
|
||||
|
Loading…
Reference in New Issue
Block a user