lib.versions: version string functions
lib.versions.splitVersion
Break a version string into its component parts.
Located at lib/versions.nix:12 in <nixpkgs>
.
lib.versions.major
Get the major version string from a string.
-
v
-
Function argument
Located at lib/versions.nix:20 in <nixpkgs>
.
lib.versions.minor
Get the minor version string from a string.
-
v
-
Function argument
Located at lib/versions.nix:28 in <nixpkgs>
.
lib.versions.patch
Get the patch version string from a string.
-
v
-
Function argument
Located at lib/versions.nix:36 in <nixpkgs>
.
lib.versions.majorMinor
Get string of the first two parts (major and minor) of a version string.
-
v
-
Function argument
Located at lib/versions.nix:45 in <nixpkgs>
.
lib.versions.pad
Pad a version string with zeros to match the given number of components.
-
n
-
Function argument
-
version
-
Function argument
Example
lib.versions.pad
usage example
pad 3 "1.2"
=> "1.2.0"
pad 3 "1.3-rc1"
=> "1.3.0-rc1"
pad 3 "1.2.3.4"
=> "1.2.3"
Located at lib/versions.nix:59 in <nixpkgs>
.