From fa7428470abdfea7a4e1e1ac5d3e9ebac452f2a2 Mon Sep 17 00:00:00 2001 From: apfelkuchen06 Date: Sun, 18 Jun 2023 19:28:35 +0200 Subject: [PATCH] texlive.combine: expose licensing information of combined packages --- pkgs/tools/typesetting/tex/texlive/combine.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/tools/typesetting/tex/texlive/combine.nix b/pkgs/tools/typesetting/tex/texlive/combine.nix index 008b519cd830..906ccb4eedfe 100644 --- a/pkgs/tools/typesetting/tex/texlive/combine.nix +++ b/pkgs/tools/typesetting/tex/texlive/combine.nix @@ -17,6 +17,12 @@ let pkgList = rec { combined = combinePkgs (lib.attrValues pkgSet); all = lib.filter pkgFilter combined; + licenses = let + concatLicenses = lib.foldl (acc: el: if builtins.elem el acc then acc else acc ++ [ el ]); + in lib.foldl + (acc: pkg: + concatLicenses acc (lib.toList (pkg.meta.license or []))) + [] all; splitBin = builtins.partition (p: p.tlType == "bin") all; bin = splitBin.right ++ lib.optional @@ -84,6 +90,7 @@ let in (buildEnv { inherit name; + meta.license = pkgList.licenses; ignoreCollisions = false;