mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
ba3c9df01a
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 |
||
---|---|---|
.. | ||
applications | ||
build-support | ||
common-updater | ||
data | ||
desktops | ||
development | ||
games | ||
misc | ||
os-specific | ||
servers | ||
shells | ||
stdenv | ||
test | ||
tools | ||
top-level |