From 6cd4468d96ad049ab2fbc67312ea84dee6799180 Mon Sep 17 00:00:00 2001 From: Vincenzo Mantova <1962985+xworld21@users.noreply.github.com> Date: Mon, 10 Jul 2023 00:14:02 +0100 Subject: [PATCH] texlive: use lib.recursiveUpdate for tlpdb overrides (#242118) --- .../tools/typesetting/tex/texlive/default.nix | 38 +++++++------------ 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix index def8b112011c..6ed1ba7e7942 100644 --- a/pkgs/tools/typesetting/tex/texlive/default.nix +++ b/pkgs/tools/typesetting/tex/texlive/default.nix @@ -34,40 +34,30 @@ let tl = let orig = removeAttrs tlpdb [ "00texlive.config" ]; - overridden = orig // { + overridden = lib.recursiveUpdate orig { # overrides of texlive.tlpdb # only *.po for tlmgr - texlive-msg-translations = builtins.removeAttrs orig.texlive-msg-translations [ "hasTlpkg" ]; + texlive-msg-translations.hasTlpkg = false; - xdvi = orig.xdvi // { # it seems to need it to transform fonts - deps = (orig.xdvi.deps or []) ++ [ "metafont" ]; - }; + # it seems to need it to transform fonts + xdvi.deps = (orig.xdvi.deps or []) ++ [ "metafont" ]; - arabi-add = orig.arabi-add // { - # tlpdb lists license as "unknown", but the README says lppl13: http://mirrors.ctan.org/language/arabic/arabi-add/README - license = [ "lppl13c" ]; - }; + # tlpdb lists license as "unknown", but the README says lppl13: http://mirrors.ctan.org/language/arabic/arabi-add/README + arabi-add.license = [ "lppl13c" ]; # TODO: remove this when updating to texlive-2023, npp-for-context is no longer in texlive - npp-for-context = orig.npp-for-context // { - # tlpdb lists license as "noinfo", but it's gpl3: https://github.com/luigiScarso/context-npp - license = [ "gpl3Only" ]; - }; + # tlpdb lists license as "noinfo", but it's gpl3: https://github.com/luigiScarso/context-npp + npp-for-context.license = [ "gpl3Only" ]; # remove dependency-heavy packages from the basic collections - collection-basic = orig.collection-basic // { - deps = lib.filter (n: n != "metafont" && n != "xdvi") orig.collection-basic.deps; - }; - # add them elsewhere so that collections cover all packages - collection-metapost = orig.collection-metapost // { - deps = orig.collection-metapost.deps ++ [ "metafont" ]; - }; - collection-plaingeneric = orig.collection-plaingeneric // { - deps = orig.collection-plaingeneric.deps ++ [ "xdvi" ]; - }; + collection-basic.deps = lib.subtractLists [ "metafont" "xdvi" ] orig.collection-basic.deps; - texdoc = orig.texdoc // { + # add them elsewhere so that collections cover all packages + collection-metapost.deps = orig.collection-metapost.deps ++ [ "metafont" ]; + collection-plaingeneric.deps = orig.collection-plaingeneric.deps ++ [ "xdvi" ]; + + texdoc = { extraRevision = ".tlpdb${toString tlpdbVersion.revision}"; extraVersion = "-tlpdb-${toString tlpdbVersion.revision}";