diff options
Diffstat (limited to 'guix/utils.scm')
-rw-r--r-- | guix/utils.scm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/guix/utils.scm b/guix/utils.scm index 537d0490e0..2d82329cb7 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -91,6 +91,7 @@ %current-system %current-target-system package-name->name+version + downstream-package-name target-linux? target-hurd? system-hurd? @@ -706,6 +707,14 @@ a character other than '@'." (idx (values (substring spec 0 idx) (substring spec (1+ idx)))))) +(define (downstream-package-name prefix name) + "Return the Guix package name for a given package NAME." + (string-append prefix (string-map (match-lambda + (#\_ #\-) + (#\. #\-) + (chr (char-downcase chr))) + name))) + (define* (target-linux? #:optional (target (or (%current-target-system) (%current-system)))) "Does the operating system of TARGET use the Linux kernel?" |