mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-18 13:36:36 +01:00
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>
This commit is contained in:
parent
01c4e02e33
commit
f6b85da0b9
4 changed files with 11 additions and 9 deletions
|
@ -44,6 +44,7 @@ (define-module (guix import elpa)
|
|||
#: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)
|
||||
|
|
|
@ -35,6 +35,7 @@ (define-module (guix import texlive)
|
|||
#: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)
|
||||
|
|
|
@ -83,7 +83,6 @@ (define-module (guix import utils)
|
|||
read-lines
|
||||
chunk-lines
|
||||
|
||||
downstream-package-name
|
||||
guix-name
|
||||
|
||||
recursive-import))
|
||||
|
@ -614,14 +613,6 @@ (define* (chunk-lines lines #:optional (pred string-null?))
|
|||
(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
|
||||
|
|
|
@ -91,6 +91,7 @@ (define-module (guix utils)
|
|||
%current-system
|
||||
%current-target-system
|
||||
package-name->name+version
|
||||
downstream-package-name
|
||||
target-linux?
|
||||
target-hurd?
|
||||
system-hurd?
|
||||
|
@ -706,6 +707,14 @@ (define* (package-name->name+version spec
|
|||
(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?"
|
||||
|
|
Loading…
Reference in a new issue