texlive: put snapshot date into the version

This commit is contained in:
Dmitry Kalinkin 2021-01-09 18:42:07 -05:00
parent 3d3f22e7be
commit ac255ab62e
No known key found for this signature in database
GPG Key ID: 5157B3EC8B2CA333
2 changed files with 13 additions and 4 deletions

View File

@ -2,10 +2,12 @@ params: with params;
# combine = # combine =
args@{ args@{
pkgFilter ? (pkg: pkg.tlType == "run" || pkg.tlType == "bin" || pkg.pname == "core") pkgFilter ? (pkg: pkg.tlType == "run" || pkg.tlType == "bin" || pkg.pname == "core")
, extraName ? "combined", ... , extraName ? "combined"
, extraVersion ? ""
, ...
}: }:
let let
pkgSet = removeAttrs args [ "pkgFilter" "extraName" ] // { pkgSet = removeAttrs args [ "pkgFilter" "extraName" "extraVersion" ] // {
# include a fake "core" package # include a fake "core" package
core.pkgs = [ core.pkgs = [
(bin.core.out // { pname = "core"; tlType = "bin"; }) (bin.core.out // { pname = "core"; tlType = "bin"; })
@ -37,7 +39,7 @@ let
(map (p: p.outPath) (builtins.filter lib.isDerivation pkgs)); (map (p: p.outPath) (builtins.filter lib.isDerivation pkgs));
in (buildEnv { in (buildEnv {
name = "texlive-${extraName}-${bin.texliveYear}"; name = "texlive-${extraName}-${bin.texliveYear}${extraVersion}";
extraPrefix = "/share/texmf"; extraPrefix = "/share/texmf";

View File

@ -88,6 +88,12 @@ let
++ combinePkgs (attrs.deps or {}); ++ combinePkgs (attrs.deps or {});
}; };
snapshot = {
year = "2020";
month = "10";
day = "09";
};
# create a derivation that contains an unpacked upstream TL package # create a derivation that contains an unpacked upstream TL package
mkPkg = { pname, tlType, revision, version, sha512, postUnpack ? "", stripPrefix ? 1, ... }@args: mkPkg = { pname, tlType, revision, version, sha512, postUnpack ? "", stripPrefix ? 1, ... }@args:
let let
@ -110,7 +116,7 @@ let
#"ftp://tug.org/texlive/historic/2019/tlnet-final/archive" #"ftp://tug.org/texlive/historic/2019/tlnet-final/archive"
# Daily snapshots hosted by one of the texlive release managers # Daily snapshots hosted by one of the texlive release managers
https://texlive.info/tlnet-archive/2020/10/09/tlnet/archive "https://texlive.info/tlnet-archive/${snapshot.year}/${snapshot.month}/${snapshot.day}/tlnet/archive"
]; ];
src = fetchurl { inherit urls sha512; }; src = fetchurl { inherit urls sha512; };
@ -174,6 +180,7 @@ in
(combine { (combine {
${pname} = attrs; ${pname} = attrs;
extraName = "combined" + lib.removePrefix "scheme" pname; extraName = "combined" + lib.removePrefix "scheme" pname;
extraVersion = ".${snapshot.year}${snapshot.month}${snapshot.day}";
}) })
) )
{ inherit (tl) { inherit (tl)