[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
39/155: import cran: description->package: Also return package dependenc
From: |
John Darrington |
Subject: |
39/155: import cran: description->package: Also return package dependencies. |
Date: |
Wed, 21 Dec 2016 20:48:32 +0000 (UTC) |
jmd pushed a commit to branch wip-installer
in repository guix.
commit da2d559a470d723b75c0e0a6cfa514c9d3dde4bc
Author: Ricardo Wurmus <address@hidden>
Date: Tue May 17 15:17:54 2016 +0200
import cran: description->package: Also return package dependencies.
* guix/import/cran.scm (description->package): Return package
dependencies in addition to generated package expression.
---
guix/import/cran.scm | 58 +++++++++++++++++++++++++++-----------------------
1 file changed, 31 insertions(+), 27 deletions(-)
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index c98ab88..313e26b 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -23,6 +23,7 @@
#:use-module ((ice-9 rdelim) #:select (read-string))
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
+ #:use-module (ice-9 receive)
#:use-module (guix http-client)
#:use-module (guix hash)
#:use-module (guix store)
@@ -179,33 +180,36 @@ from the alist META, which was derived from the R
package's DESCRIPTION file."
(_ #f)))
(tarball (with-store store (download-to-store store source-url)))
(sysdepends (map string-downcase (listify meta "SystemRequirements")))
- (propagate (map guix-name (lset-union equal?
- (listify meta "Imports")
- (listify meta "LinkingTo")
- (delete "R"
- (listify meta
"Depends"))))))
- `(package
- (name ,(guix-name name))
- (version ,version)
- (source (origin
- (method url-fetch)
- (uri (,(procedure-name uri-helper) ,name version))
- (sha256
- (base32
- ,(bytevector->nix-base32-string (file-sha256 tarball))))))
- ,@(if (not (equal? (string-append "r-" name)
- (guix-name name)))
- `((properties ,`(,'quasiquote ((,'upstream-name . ,name)))))
- '())
- (build-system r-build-system)
- ,@(maybe-inputs sysdepends)
- ,@(maybe-inputs propagate 'propagated-inputs)
- (home-page ,(if (string-null? home-page)
- (string-append base-url name)
- home-page))
- (synopsis ,synopsis)
- (description ,(beautify-description (assoc-ref meta "Description")))
- (license ,license))))
+ (propagate (lset-union equal?
+ (listify meta "Imports")
+ (listify meta "LinkingTo")
+ (delete "R"
+ (listify meta "Depends")))))
+ (values
+ `(package
+ (name ,(guix-name name))
+ (version ,version)
+ (source (origin
+ (method url-fetch)
+ (uri (,(procedure-name uri-helper) ,name version))
+ (sha256
+ (base32
+ ,(bytevector->nix-base32-string (file-sha256 tarball))))))
+ ,@(if (not (equal? (string-append "r-" name)
+ (guix-name name)))
+ `((properties ,`(,'quasiquote ((,'upstream-name . ,name)))))
+ '())
+ (build-system r-build-system)
+ ,@(maybe-inputs sysdepends)
+ ,@(maybe-inputs (map guix-name propagate) 'propagated-inputs)
+ (home-page ,(if (string-null? home-page)
+ (string-append base-url name)
+ home-page))
+ (synopsis ,synopsis)
+ (description ,(beautify-description (or (assoc-ref meta "Description")
+ "")))
+ (license ,license))
+ propagate)))
(define* (cran->guix-package package-name #:optional (repo 'cran))
"Fetch the metadata for PACKAGE-NAME from REPO and return the `package'
- 17/155: gnu: tor: Recommend torsocks., (continued)
- 17/155: gnu: tor: Recommend torsocks., John Darrington, 2016/12/21
- 10/155: installer: Perform a task's dependencies prior to the task itself., John Darrington, 2016/12/21
- 28/155: gnu: Add emacs-guix., John Darrington, 2016/12/21
- 30/155: gnu: star: Update to 2.5.2b., John Darrington, 2016/12/21
- 46/155: gnu: pinentry: Update to 1.0.0., John Darrington, 2016/12/21
- 52/155: gnu: r: Update to 3.3.2., John Darrington, 2016/12/21
- 44/155: import cran: Handle HTTP errors., John Darrington, 2016/12/21
- 26/155: gnu: imagemagick: Update to 6.9.6-8., John Darrington, 2016/12/21
- 40/155: import cran: Ignore default R packages., John Darrington, 2016/12/21
- 50/155: gnu: sane-backends: Remove timestamps from the output., John Darrington, 2016/12/21
- 39/155: import cran: description->package: Also return package dependencies.,
John Darrington <=
- 45/155: gnu: npth: Update to 1.3., John Darrington, 2016/12/21
- 42/155: import cran: Add "recursive" option., John Darrington, 2016/12/21
- 32/155: profiles: Remove dependency on 'glibc-utf8-locales' for tests., John Darrington, 2016/12/21
- 31/155: gnu: bootstrap: Add FTP URL for bootstrap binaries., John Darrington, 2016/12/21
- 53/155: gnu: youtube-dl: Update to 2016.12.15., John Darrington, 2016/12/21
- 49/155: gnu: Add and use sane-backends., John Darrington, 2016/12/21
- 61/155: tests: Mock up http-fetch., John Darrington, 2016/12/21
- 57/155: gnu: yoshimi: Update to 1.5.0., John Darrington, 2016/12/21
- 56/155: tests: Mock up http-fetch in import test., John Darrington, 2016/12/21
- 48/155: gnu: Add and use sane-backends-minimal., John Darrington, 2016/12/21