texlive: use lib.recursiveUpdate for tlpdb overrides (#242118)

authored by

Vincenzo Mantova and committed by
GitHub
6cd4468d 19c40caf

+13 -23
+13 -23
pkgs/tools/typesetting/tex/texlive/default.nix
··· 34 34 tl = let 35 35 orig = removeAttrs tlpdb [ "00texlive.config" ]; 36 36 37 - overridden = orig // { 37 + overridden = lib.recursiveUpdate orig { 38 38 # overrides of texlive.tlpdb 39 39 40 40 # only *.po for tlmgr 41 - texlive-msg-translations = builtins.removeAttrs orig.texlive-msg-translations [ "hasTlpkg" ]; 41 + texlive-msg-translations.hasTlpkg = false; 42 42 43 - xdvi = orig.xdvi // { # it seems to need it to transform fonts 44 - deps = (orig.xdvi.deps or []) ++ [ "metafont" ]; 45 - }; 43 + # it seems to need it to transform fonts 44 + xdvi.deps = (orig.xdvi.deps or []) ++ [ "metafont" ]; 46 45 47 - arabi-add = orig.arabi-add // { 48 - # tlpdb lists license as "unknown", but the README says lppl13: http://mirrors.ctan.org/language/arabic/arabi-add/README 49 - license = [ "lppl13c" ]; 50 - }; 46 + # tlpdb lists license as "unknown", but the README says lppl13: http://mirrors.ctan.org/language/arabic/arabi-add/README 47 + arabi-add.license = [ "lppl13c" ]; 51 48 52 49 # TODO: remove this when updating to texlive-2023, npp-for-context is no longer in texlive 53 - npp-for-context = orig.npp-for-context // { 54 - # tlpdb lists license as "noinfo", but it's gpl3: https://github.com/luigiScarso/context-npp 55 - license = [ "gpl3Only" ]; 56 - }; 50 + # tlpdb lists license as "noinfo", but it's gpl3: https://github.com/luigiScarso/context-npp 51 + npp-for-context.license = [ "gpl3Only" ]; 57 52 58 53 # remove dependency-heavy packages from the basic collections 59 - collection-basic = orig.collection-basic // { 60 - deps = lib.filter (n: n != "metafont" && n != "xdvi") orig.collection-basic.deps; 61 - }; 54 + collection-basic.deps = lib.subtractLists [ "metafont" "xdvi" ] orig.collection-basic.deps; 55 + 62 56 # add them elsewhere so that collections cover all packages 63 - collection-metapost = orig.collection-metapost // { 64 - deps = orig.collection-metapost.deps ++ [ "metafont" ]; 65 - }; 66 - collection-plaingeneric = orig.collection-plaingeneric // { 67 - deps = orig.collection-plaingeneric.deps ++ [ "xdvi" ]; 68 - }; 57 + collection-metapost.deps = orig.collection-metapost.deps ++ [ "metafont" ]; 58 + collection-plaingeneric.deps = orig.collection-plaingeneric.deps ++ [ "xdvi" ]; 69 59 70 - texdoc = orig.texdoc // { 60 + texdoc = { 71 61 extraRevision = ".tlpdb${toString tlpdbVersion.revision}"; 72 62 extraVersion = "-tlpdb-${toString tlpdbVersion.revision}"; 73 63