From a424dacb8a50f08bef9dbe7eeaa309d8f8880d9a Mon Sep 17 00:00:00 2001 From: apfelkuchen06 Date: Mon, 21 Aug 2023 22:41:53 +0200 Subject: texlive: move combinePkgs from default.nix to combine.nix --- pkgs/tools/typesetting/tex/texlive/combine.nix | 16 ++++++++++++++++ pkgs/tools/typesetting/tex/texlive/default.nix | 18 +----------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pkgs/tools/typesetting/tex/texlive/combine.nix b/pkgs/tools/typesetting/tex/texlive/combine.nix index 1821d1c090d..a39b9da2309 100644 --- a/pkgs/tools/typesetting/tex/texlive/combine.nix +++ b/pkgs/tools/typesetting/tex/texlive/combine.nix @@ -8,6 +8,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); diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix index 90a65ab1405..37b10f28b33 100644 --- a/pkgs/tools/typesetting/tex/texlive/default.nix +++ b/pkgs/tools/typesetting/tex/texlive/default.nix @@ -23,7 +23,7 @@ let # function for creating a working environment from a set of TL packages combine = import ./combine.nix { - inherit bin combinePkgs buildEnv lib makeWrapper writeText runCommand + inherit bin buildEnv lib makeWrapper writeText runCommand stdenv perl libfaketime makeFontsConf bash tl coreutils gawk gnugrep gnused; ghostscript = ghostscript_headless; }; @@ -492,22 +492,6 @@ let // lib.optionalAttrs (args ? deps) { deps = map (n: tl.${n}) (args.deps or [ ]); }) ) overriddenTlpdb; - # 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 []); - }); - assertions = with lib; assertMsg (tlpdbVersion.year == version.texliveYear) "TeX Live year in texlive does not match tlpdb.nix, refusing to evaluate" && assertMsg (tlpdbVersion.frozen == version.final) "TeX Live final status in texlive does not match tlpdb.nix, refusing to evaluate"; -- cgit 1.4.1