1 /* Version string functions. */
6 /* Break a version string into its component parts.
12 splitVersion = builtins.splitVersion or (lib.splitString ".");
14 /* Get the major version string from a string.
20 major = v: builtins.elemAt (splitVersion v) 0;
22 /* Get the minor version string from a string.
28 minor = v: builtins.elemAt (splitVersion v) 1;
30 /* Get the patch version string from a string.
36 patch = v: builtins.elemAt (splitVersion v) 2;
38 /* Get string of the first two parts (major and minor)
46 builtins.concatStringsSep "."
47 (lib.take 2 (splitVersion v));