guix: utils: Add version-major.
* guix/utils.scm (version-major): New procedure.
This commit is contained in:
parent
1e52fd83c2
commit
47dc9a0dae
1 changed files with 5 additions and 0 deletions
|
@ -82,6 +82,7 @@ (define-module (guix utils)
|
||||||
version>=?
|
version>=?
|
||||||
version-prefix
|
version-prefix
|
||||||
version-major+minor
|
version-major+minor
|
||||||
|
version-major
|
||||||
guile-version>?
|
guile-version>?
|
||||||
string-replace-substring
|
string-replace-substring
|
||||||
arguments-from-environment-variable
|
arguments-from-environment-variable
|
||||||
|
@ -497,6 +498,10 @@ (define (version-major+minor version-string)
|
||||||
minor version numbers from version-string."
|
minor version numbers from version-string."
|
||||||
(version-prefix version-string 2))
|
(version-prefix version-string 2))
|
||||||
|
|
||||||
|
(define (version-major version-string)
|
||||||
|
"Return the major version number as string from the version-string."
|
||||||
|
(version-prefix version-string 1))
|
||||||
|
|
||||||
(define (version>? a b)
|
(define (version>? a b)
|
||||||
"Return #t when A denotes a version strictly newer than B."
|
"Return #t when A denotes a version strictly newer than B."
|
||||||
(eq? '> (version-compare a b)))
|
(eq? '> (version-compare a b)))
|
||||||
|
|
Loading…
Reference in a new issue