Unverified Commit bf6e5e74 authored by Dmitry Kalinkin's avatar Dmitry Kalinkin Committed by GitHub
Browse files

Merge pull request #250621 from apfelkuchen6/texlive-noop-refactors

texlive: some small refactors
parents a999c1cc babce2f2
Loading
Loading
Loading
Loading
+19 −1
Original line number Diff line number Diff line
params: with params;
{ lib, buildEnv, runCommand, writeText, makeWrapper, libfaketime, makeFontsConf
, perl, bash, coreutils, gnused, gnugrep, gawk, ghostscript
, bin, tl }:
# combine =
args@{
  pkgFilter ? (pkg: pkg.tlType == "run" || pkg.tlType == "bin" || pkg.pname == "core"
@@ -8,6 +10,22 @@ args@{
, ...
}:
let
  # combine a set of TL packages into a single TL meta-package
  combinePkgs = pkgList: lib.catAttrs "pkg" (
    let
      # a TeX package is an attribute set { pkgs = [ ... ]; ... } where pkgs is a list of derivations
      # the derivations make up the TeX package and optionally (for backward compatibility) its dependencies
      tlPkgToSets = { pkgs, ... }: map ({ tlType, version ? "", outputName ? "", ... }@pkg: {
          # outputName required to distinguish among bin.core-big outputs
          key = "${pkg.pname or pkg.name}.${tlType}-${version}-${outputName}";
          inherit pkg;
        }) pkgs;
      pkgListToSets = lib.concatMap tlPkgToSets; in
    builtins.genericClosure {
      startSet = pkgListToSets pkgList;
      operator = { pkg, ... }: pkgListToSets (pkg.tlDeps or []);
    });

  pkgSet = removeAttrs args [ "pkgFilter" "extraName" "extraVersion" ];
  pkgList = rec {
    combined = combinePkgs (lib.attrValues pkgSet);
+10 −418

File changed.

Preview size limit exceeded, changes collapsed.

+411 −0

File added.

Preview size limit exceeded, changes collapsed.