diff options
author | Herman Rimm <herman@rimm.ee> | 2024-12-20 18:35:03 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2024-12-30 13:49:57 +0100 |
commit | f6b85da0b97a1627df35025d1949e1f73b93696d (patch) | |
tree | 347f4c9aa6d727598a87116f69e900a125420521 /guix/utils.scm | |
parent | 01c4e02e33b71e319b2b16507d008cc3e9e1fd9f (diff) |
import: utils: Move downstream-package-name to (guix utils).
* guix/import/elpa.scm: Import (guix utils).
* guix/import/texlive.scm: Import (guix utils).
* guix/import/utils.scm (downstream-package-name): Move to ...
* guix/utils.scm (downstream-package-name): ... here.
Change-Id: If56a452f64ed06c8bb06a96a283a5067cb54d602
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
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?" |