From 80cd75f4cb07ab7b48e750b783be8eee721445f3 Mon Sep 17 00:00:00 2001 From: Vincenzo Mantova <1962985+xworld21@users.noreply.github.com> Date: Sat, 4 Nov 2023 20:02:25 +0000 Subject: [PATCH] texlive: export schemes at top level --- pkgs/test/texlive/default.nix | 2 +- pkgs/tools/typesetting/tex/texlive/default.nix | 7 +++++++ pkgs/top-level/all-packages.nix | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/test/texlive/default.nix b/pkgs/test/texlive/default.nix index 708134668826..db94d3070ca4 100644 --- a/pkgs/test/texlive/default.nix +++ b/pkgs/test/texlive/default.nix @@ -623,7 +623,7 @@ rec { (savedLicensesAttrNames scheme) != (correctLicensesAttrNames scheme); incorrectSchemes = lib.filterAttrs (n: hasLicenseMismatch) - texlive.combined; + (texlive.combined // texlive.schemes); prettyPrint = name: scheme: '' license info for ${name} is incorrect! Note that order is enforced. diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix index 11eeec0d5dd3..bb505f4062b7 100644 --- a/pkgs/tools/typesetting/tex/texlive/default.nix +++ b/pkgs/tools/typesetting/tex/texlive/default.nix @@ -194,6 +194,11 @@ let ) ); + schemes = lib.listToAttrs (map (s: { + name = "texlive" + s; + value = lib.addMetaAttrs { license = licenses.${"scheme-" + (lib.toLower s)}; } (buildTeXEnv { requiredTeXPackages = ps: [ ps.${"scheme-" + (lib.toLower s)} ]; }); + }) [ "Basic" "BookPub" "ConTeXt" "Full" "GUST" "InfraOnly" "Medium" "Minimal" "Small" "TeTeX" ]); + in allPkgLists // { pkgs = tl; @@ -213,6 +218,8 @@ in combined = assert assertions; combined; + inherit schemes; + # convenience alias withPackages = (buildTeXEnv { }).withPackages; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a6e9ae80df63..960184512ea6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5446,6 +5446,7 @@ with pkgs; # TeX Live; see https://nixos.org/nixpkgs/manual/#sec-language-texlive texlive = recurseIntoAttrs (callPackage ../tools/typesetting/tex/texlive { }); + inherit (texlive.schemes) texliveBasic texliveBookPub texliveConTeXt texliveFull texliveGUST texliveInfraOnly texliveMedium texliveMinimal texliveSmall texliveTeTeX; fop = callPackage ../tools/typesetting/fop { jdk = openjdk8;