summaryrefslogtreecommitdiff
path: root/guix/import
diff options
context:
space:
mode:
Diffstat (limited to 'guix/import')
-rw-r--r--guix/import/egg.scm9
-rw-r--r--guix/import/github.scm5
-rw-r--r--guix/import/pypi.scm8
-rw-r--r--guix/import/texlive.scm20
-rw-r--r--guix/import/utils.scm2
5 files changed, 27 insertions, 17 deletions
diff --git a/guix/import/egg.scm b/guix/import/egg.scm
index 0b88020554..52196583c4 100644
--- a/guix/import/egg.scm
+++ b/guix/import/egg.scm
@@ -85,11 +85,6 @@
(define %eggs-home-page
(make-parameter "https://wiki.call-cc.org/egg"))
-(define (egg-source-url name version)
- "Return the URL to the source tarball for version VERSION of the CHICKEN egg
-NAME."
- `(egg-uri ,name version))
-
(define (egg-name->guix-name name)
"Return the package name for CHICKEN egg NAME."
(string-append package-name-prefix name))
@@ -196,7 +191,7 @@ not work."
(let* ((version* (or (assoc-ref egg-content 'version)
(find-latest-version name)))
(version (if (list? version*) (first version*) version*))
- (source-url (if source #f (egg-source-url name version)))
+ (source-url (if source #f `(egg-uri ,name version)))
(tarball (if source
#f
(with-store store
@@ -342,7 +337,7 @@ not work."
"Return an @code{<upstream-source>} for the latest release of PACKAGE."
(let* ((egg-name (guix-package->egg-name package))
(version (find-latest-version egg-name))
- (source-url (egg-source-url egg-name version)))
+ (source-url (egg-uri egg-name version)))
(upstream-source
(package (package-name package))
(version version)
diff --git a/guix/import/github.scm b/guix/import/github.scm
index 51118d1d39..e1a1af7133 100644
--- a/guix/import/github.scm
+++ b/guix/import/github.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2022 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -95,8 +96,8 @@ false if none is recognized"
((string-suffix? (string-append "/releases/download/" repo "-"
version "/" repo "-" version ext)
url)
- (string-append "/releases/download/" repo "-" version "/" repo "-"
- version ext))
+ (string-append prefix "/releases/download/" repo "-" new-version "/"
+ repo "-" new-version ext))
(#t #f))) ; Some URLs are not recognised.
#f))
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index 392fc9700b..4760fc3dae 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -161,9 +161,11 @@ or #f if there isn't any."
(define (python->package-name name)
"Given the NAME of a package on PyPI, return a Guix-compliant name for the
package."
- (if (string-prefix? "python-" name)
- (snake-case name)
- (string-append "python-" (snake-case name))))
+ (cond
+ ((string-prefix? "python-" name) (snake-case name))
+ ((or (string=? "trytond" name)
+ (string-prefix? "trytond-" name)) (snake-case name))
+ (else (string-append "python-" (snake-case name)))))
(define (guix-package->pypi-name package)
"Given a Python PACKAGE built from pypi.org, return the name of the
diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index c741555928..116bd1f66a 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -246,7 +246,7 @@ of those files are returned that are unexpectedly installed."
;; entries with the same prefix.
(lambda (x y) (every equal? x y)))))
-(define (tlpdb->package name package-database)
+(define (tlpdb->package name version package-database)
(and-let* ((data (assoc-ref package-database name))
(dirs (files->directories
(map (lambda (dir)
@@ -255,7 +255,9 @@ of those files are returned that are unexpectedly installed."
(or (assoc-ref data 'runfiles) (list))
(or (assoc-ref data 'srcfiles) (list))))))
(name (guix-name name))
- (version (number->string %texlive-revision))
+ ;; TODO: we're ignoring the VERSION argument because that
+ ;; information is distributed across %texlive-tag and
+ ;; %texlive-revision.
(ref (svn-multi-reference
(url (string-append "svn://www.tug.org/texlive/tags/"
%texlive-tag "/Master/texmf-dist"))
@@ -276,6 +278,9 @@ of those files are returned that are unexpectedly installed."
(force-output port)
(get-hash))))
,@(if (assoc-ref data 'srcfiles) '() '(#:trivial? #true))))
+ ;; package->definition in (guix import utils) expects to see a
+ ;; version field.
+ (version ,version)
,@(or (and=> (assoc-ref data 'depend)
(lambda (inputs)
`((propagated-inputs
@@ -297,13 +302,18 @@ of those files are returned that are unexpectedly installed."
(define texlive->guix-package
(memoize
- (lambda* (name #:key repo version (package-database tlpdb))
+ (lambda* (name #:key
+ repo
+ (version (number->string %texlive-revision))
+ (package-database tlpdb))
"Find the metadata for NAME in the tlpdb and return the `package'
s-expression corresponding to that package, or #f on failure."
- (tlpdb->package name (package-database)))))
+ (tlpdb->package name version (package-database)))))
-(define (texlive-recursive-import name)
+(define* (texlive-recursive-import name #:key repo version)
(recursive-import name
+ #:repo repo
+ #:version version
#:repo->guix-package texlive->guix-package
#:guix-name guix-name))
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 26eebfece5..668b8c8083 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -341,6 +341,8 @@ APPEND-VERSION?/string is a string, append this string."
(match guix-package
((or
('package ('name name) ('version version) . rest)
+ ('package ('inherit ('simple-texlive-package name . _))
+ ('version version) . rest)
('let _ ('package ('name name) ('version version) . rest)))
`(define-public ,(string->symbol