mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
cuda-modules: fix sort
predicate stability
Incorrect sorting predicate was found as part of https://github.com/NixOS/nix/issues/12106 where `nix` was crashing on the code like: $ nix eval --expr 'builtins.sort (a: b: true) [ 1 2 3 ]' ... Aborted (core dumped) Note: the crash happens here because sorting predicate does not implement `isLess` and triggers assertion failures for `std::stable_sort` that backs `builtins.sort`. THe change restore `isLess` semantic for `preferable`.
This commit is contained in:
parent
8fa343c6b4
commit
9fd753ea84
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ let
|
|||
redistArch = flags.getRedistArch hostPlatform.system;
|
||||
|
||||
preferable =
|
||||
p1: p2: (isSupported p2 -> isSupported p1) && (strings.versionAtLeast p1.version p2.version);
|
||||
p1: p2: (isSupported p2 -> isSupported p1) && (strings.versionOlder p2.version p1.version);
|
||||
|
||||
# All the supported packages we can build for our platform.
|
||||
# perSystemReleases :: List Package
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue