summary refs log tree commit diff
path: root/pkgs/test
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-11-01 18:01:01 +0000
committerGitHub <noreply@github.com>2023-11-01 18:01:01 +0000
commitcd7af6170bf16a4935e2729594ebfc7f03760ec8 (patch)
tree0fab6b4d9518da1d8238f2365bfae676a94a7a4e /pkgs/test
parentd07f6b7c345d3565a83dc2fb683c9aa9fa2c3b4f (diff)
parent6b6bb56d412fec32860dbd35310a622f84119f5f (diff)
downloadnixpkgs-cd7af6170bf16a4935e2729594ebfc7f03760ec8.tar
nixpkgs-cd7af6170bf16a4935e2729594ebfc7f03760ec8.tar.gz
nixpkgs-cd7af6170bf16a4935e2729594ebfc7f03760ec8.tar.bz2
nixpkgs-cd7af6170bf16a4935e2729594ebfc7f03760ec8.tar.lz
nixpkgs-cd7af6170bf16a4935e2729594ebfc7f03760ec8.tar.xz
nixpkgs-cd7af6170bf16a4935e2729594ebfc7f03760ec8.tar.zst
nixpkgs-cd7af6170bf16a4935e2729594ebfc7f03760ec8.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/test')
-rw-r--r--pkgs/test/texlive/default.nix19
1 files changed, 10 insertions, 9 deletions
diff --git a/pkgs/test/texlive/default.nix b/pkgs/test/texlive/default.nix
index 12c42444f18..70813466882 100644
--- a/pkgs/test/texlive/default.nix
+++ b/pkgs/test/texlive/default.nix
@@ -454,8 +454,7 @@ rec {
       '';
 
       # link all binaries in single derivation
-      allPackages = with lib; concatLists (catAttrs "pkgs" (filter isAttrs (attrValues texlive)));
-      binPackages = lib.filter (p: p.tlType == "bin") allPackages;
+      binPackages = lib.catAttrs "out" (lib.attrValues texlive.pkgs);
       binaries = buildEnv { name = "texlive-binaries"; paths = binPackages; };
     in
     runCommand "texlive-test-binaries"
@@ -565,8 +564,7 @@ rec {
 
   # check that all scripts have a Nix shebang
   shebangs = let
-      allPackages = with lib; concatLists (catAttrs "pkgs" (filter isAttrs (attrValues texlive)));
-      binPackages = lib.filter (p: p.tlType == "bin") allPackages;
+      binPackages = lib.catAttrs "out" (lib.attrValues texlive.pkgs);
     in
     runCommand "texlive-test-shebangs" { }
       (''
@@ -615,7 +613,7 @@ rec {
         correctLicenses = scheme: builtins.foldl'
                 (acc: pkg: concatLicenses acc (lib.toList (pkg.meta.license or [])))
                 []
-                scheme.passthru.packages;
+                scheme.passthru.requiredTeXPackages;
         correctLicensesAttrNames = scheme:
           lib.sort lt
             (map licenseToAttrName (correctLicenses scheme));
@@ -648,10 +646,13 @@ rec {
   # this is effectively an eval-time assertion, converted into a derivation for
   # ease of testing
   fixedHashes = with lib; let
-    combine = findFirst (p: (head p.pkgs).pname == "combine") { pkgs = []; } (head texlive.collection-latexextra.pkgs).tlDeps;
-    all = concatLists (map (p: p.pkgs or []) (attrValues (removeAttrs texlive [ "bin" "combine" "combined" "tlpdb" ]))) ++ combine.pkgs;
-    fods = filter (p: isDerivation p && p.tlType != "bin") all;
-    errorText = concatMapStrings (p: optionalString (! p ? outputHash) "${p.pname + optionalString (p.tlType != "run") ("." + p.tlType)} does not have a fixed output hash\n") fods;
+    fods = lib.concatMap
+      (p: lib.optional (p ? tex) p.tex
+        ++ lib.optional (p ? texdoc) p.texdoc
+        ++ lib.optional (p ? texsource) p.texsource
+        ++ lib.optional (p ? tlpkg) p.tlpkg)
+      (attrValues texlive.pkgs);
+    errorText = concatMapStrings (p: optionalString (! p ? outputHash) "${p.pname}-${p.tlOutputName} does not have a fixed output hash\n") fods;
   in runCommand "texlive-test-fixed-hashes" {
     inherit errorText;
     passAsFile = [ "errorText" ];