diff options
Diffstat (limited to 'guix/utils.scm')
-rw-r--r-- | guix/utils.scm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/guix/utils.scm b/guix/utils.scm index 4187efde41..733319a0b4 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -59,6 +59,7 @@ %current-target-system version-compare version>? + guile-version>? package-name->name+version string-tokenize* file-extension @@ -316,6 +317,15 @@ or '= when they denote equal versions." "Return #t when A denotes a newer version than B." (eq? '> (version-compare a b))) +(define (guile-version>? str) + "Return #t if the running Guile version is greater than STR." + ;; Note: Using (version>? (version) "2.0.5") or similar doesn't work, + ;; because the result of (version) can have a prefix, like "2.0.5-deb1". + (version>? (string-append (major-version) "." + (minor-version) "." + (micro-version)) + str)) + (define (package-name->name+version name) "Given NAME, a package name like \"foo-0.9.1b\", return two values: \"foo\" and \"0.9.1b\". When the version part is unavailable, NAME and |