texlive: fix evaluation on Nix 1.11

The problem was in builtins.partition call. I've tried to rewrite it with
builtins.foldl', but that doesn't help. However replacing it with a pair of
builtins.filter calls works.

diff --git a/lib/lists.nix b/lib/lists.nix
--- a/lib/lists.nix
+++ b/lib/lists.nix
@@ -242,10 +242,10 @@ rec {
        => { right = [ 5 3 4 ]; wrong = [ 1 2 ]; }
   */
   partition = builtins.partition or (pred:
-    foldr (h: t:
+    builtins.foldl' (t: h:
       if pred h
-      then { right = [h] ++ t.right; wrong = t.wrong; }
-      else { right = t.right; wrong = [h] ++ t.wrong; }
+      then { right = t.right ++ [h]; wrong = t.wrong; }
+      else { right = t.right; wrong = t.wrong ++ [h]; }
     ) { right = []; wrong = []; });

   /* Merges two lists of the same size together. If the sizes aren't the same
This commit is contained in:
Dmitry Kalinkin 2017-10-30 00:54:48 -04:00
parent eefa8d4191
commit ba3c9df01a

View File

@ -12,9 +12,11 @@ let
(bin.core.doc // { pname = "core"; tlType = "doc"; })
];
};
partition = builtins.partition or (pred: l:
{ right = builtins.filter pred l; wrong = builtins.filter (e: !(pred e)) l; });
pkgList = rec {
all = lib.filter pkgFilter (combinePkgs pkgSet);
splitBin = lib.partition (p: p.tlType == "bin") all;
splitBin = partition (p: p.tlType == "bin") all;
bin = mkUniquePkgs splitBin.right
++ lib.optional
(lib.any (p: p.tlType == "run" && p.pname == "pdfcrop") splitBin.wrong)