Prefer newer versions of dependencies when there are multiple available ones

This commit is contained in:
adisbladis 2020-06-08 19:48:47 +02:00
parent a2c8782734
commit c19f1e414a
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7

View file

@ -59,7 +59,10 @@ let
supportsPythonVersion = pkgMeta: if pkgMeta ? marker then (evalPep508 pkgMeta.marker) else true;
in
lib.partition supportsPythonVersion poetryLock.package;
compatible = partitions.right;
# Reverse the list so newer versions are iterated first
# It's possible for multiple versions of a dependency to be compatible and we want to pick the latest one
compatible = lib.reverseList partitions.right;
incompatible = partitions.wrong;
# Create an overriden version of pythonPackages