lib/versions: expose splitVersion

This commit is contained in:
Joachim Fasting
2019-09-26 17:42:42 +02:00
parent d484f2b7fc
commit fd3052901c
2 changed files with 9 additions and 5 deletions
+7 -5
View File
@@ -1,14 +1,16 @@
/* Version string functions. */
{ lib }:
let
rec {
/* Break a version string into its component parts.
Example:
splitVersion "1.2.3"
=> ["1" "2" "3"]
*/
splitVersion = builtins.splitVersion or (lib.splitString ".");
in
{
/* Get the major version string from a string.
Example: