diff options
author | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2017-10-30 00:54:48 -0400 |
---|---|---|
committer | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2017-10-30 00:54:48 -0400 |
commit | ba3c9df01aea8405ba803db13aca4ebb27d1a460 (patch) | |
tree | 911527ea094f1f2e116f1472b9f1e7ca5df58445 | |
parent | eefa8d4191c113e8c325ff799bd2ac04e93a7e09 (diff) | |
download | nixlib-ba3c9df01aea8405ba803db13aca4ebb27d1a460.tar nixlib-ba3c9df01aea8405ba803db13aca4ebb27d1a460.tar.gz nixlib-ba3c9df01aea8405ba803db13aca4ebb27d1a460.tar.bz2 nixlib-ba3c9df01aea8405ba803db13aca4ebb27d1a460.tar.lz nixlib-ba3c9df01aea8405ba803db13aca4ebb27d1a460.tar.xz nixlib-ba3c9df01aea8405ba803db13aca4ebb27d1a460.tar.zst nixlib-ba3c9df01aea8405ba803db13aca4ebb27d1a460.zip |
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
-rw-r--r-- | pkgs/tools/typesetting/tex/texlive/combine.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/tools/typesetting/tex/texlive/combine.nix b/pkgs/tools/typesetting/tex/texlive/combine.nix index 07a4196bfb5b..35fee64ba54f 100644 --- a/pkgs/tools/typesetting/tex/texlive/combine.nix +++ b/pkgs/tools/typesetting/tex/texlive/combine.nix @@ -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) |