diff --git a/pep508.nix b/pep508.nix index 9c95194..5635060 100644 --- a/pep508.nix +++ b/pep508.nix @@ -160,12 +160,12 @@ let hasElem = needle: haystack: builtins.elem needle (builtins.filter (x: builtins.typeOf x == "string") (builtins.split " " haystack)); op = { "true" = x: y: true; - "<=" = x: y: (unmarshal x) <= (unmarshal y); - "<" = x: y: (unmarshal x) < (unmarshal y); + "<=" = x: y: lib.versionAtLeast (unmarshal y) (unmarshal x); + "<" = x: y: lib.versionOlder (unmarshal x) (unmarshal y); "!=" = x: y: x != y; "==" = x: y: x == y; - ">=" = x: y: (unmarshal x) >= (unmarshal y); - ">" = x: y: (unmarshal x) > (unmarshal y); + ">=" = x: y: lib.versionAtLeast (unmarshal x) (unmarshal y); + ">" = x: y: lib.versionOlder (unmarshal y) (unmarshal x); "~=" = v: c: let parts = builtins.splitVersion c;