compareVersions
builtins.compareVersions
Primop
Docs pulled from | This Revision | about 13 hours ago
Takes 2 arguments
s1, s2
Compare two strings representing versions and return -1
if
version s1 is older than version s2, 0
if they are the same,
and 1
if s1 is newer than s2. The version comparison
algorithm is the same as the one used by nix-env -u
.
This function is not defined in a .nix file. It is likely a builtins function or an alias of a builtins function. builtins functions are predefined functions provided by Nix.
Noogle detected
Detected Type
compareVersions :: String -> String -> Int
Implementation
This function is implemented in c++ and is part of the native nix runtime.