summary refs log tree commit diff
diff options
context:
space:
mode:
authorapfelkuchen06 <apfelkuchen@hrnz.li>2023-08-21 22:41:53 +0200
committerapfelkuchen06 <apfelkuchen@hrnz.li>2023-08-27 12:12:02 +0200
commita424dacb8a50f08bef9dbe7eeaa309d8f8880d9a (patch)
treec44bcd77ff261d0f215a627828bcb017c0a01f8c
parent88d154fed5bb94076e21b8a5cd5f121c502f633a (diff)
downloadnixpkgs-a424dacb8a50f08bef9dbe7eeaa309d8f8880d9a.tar
nixpkgs-a424dacb8a50f08bef9dbe7eeaa309d8f8880d9a.tar.gz
nixpkgs-a424dacb8a50f08bef9dbe7eeaa309d8f8880d9a.tar.bz2
nixpkgs-a424dacb8a50f08bef9dbe7eeaa309d8f8880d9a.tar.lz
nixpkgs-a424dacb8a50f08bef9dbe7eeaa309d8f8880d9a.tar.xz
nixpkgs-a424dacb8a50f08bef9dbe7eeaa309d8f8880d9a.tar.zst
nixpkgs-a424dacb8a50f08bef9dbe7eeaa309d8f8880d9a.zip
texlive: move combinePkgs from default.nix to combine.nix
-rw-r--r--pkgs/tools/typesetting/tex/texlive/combine.nix16
-rw-r--r--pkgs/tools/typesetting/tex/texlive/default.nix18
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";