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 | |
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>
-rw-r--r-- | guix/import/elpa.scm | 1 | ||||
-rw-r--r-- | guix/import/texlive.scm | 1 | ||||
-rw-r--r-- | guix/import/utils.scm | 9 | ||||
-rw-r--r-- | guix/utils.scm | 9 |
4 files changed, 11 insertions, 9 deletions
diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm index b86a6a546b6..62b1d645ac2 100644 --- a/guix/import/elpa.scm +++ b/guix/import/elpa.scm @@ -44,6 +44,7 @@ #:use-module (guix git) #:use-module (guix hash) #:use-module (guix store) + #:use-module ((guix utils) #:select (downstream-package-name)) #:use-module (guix base32) #:use-module (guix upstream) #:use-module (guix packages) diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm index 8ce22a1d59f..8e67d11c69f 100644 --- a/guix/import/texlive.scm +++ b/guix/import/texlive.scm @@ -35,6 +35,7 @@ #:use-module (guix store) #:use-module (guix svn-download) #:use-module (guix upstream) + #:use-module ((guix utils) #:select (downstream-package-name)) #:use-module (ice-9 ftw) #:use-module (ice-9 match) #:use-module (ice-9 popen) diff --git a/guix/import/utils.scm b/guix/import/utils.scm index 0b1b3b32986..6f5efa790e8 100644 --- a/guix/import/utils.scm +++ b/guix/import/utils.scm @@ -83,7 +83,6 @@ read-lines chunk-lines - downstream-package-name guix-name recursive-import)) @@ -614,14 +613,6 @@ separated by PRED." (reverse res) (loop (cdr after) res)))))) -(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-deprecated/alias guix-name downstream-package-name) (define (topological-sort nodes diff --git a/guix/utils.scm b/guix/utils.scm index 537d0490e01..2d82329cb75 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?" |