summaryrefslogtreecommitdiff
path: root/guix/import
diff options
context:
space:
mode:
Diffstat (limited to 'guix/import')
-rw-r--r--guix/import/cran.scm11
-rw-r--r--guix/import/elpa.scm14
-rw-r--r--guix/import/gem.scm10
-rw-r--r--guix/import/github.scm10
-rw-r--r--guix/import/hackage.scm10
-rw-r--r--guix/import/pypi.scm10
6 files changed, 27 insertions, 38 deletions
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index 562917c0a0..69485bc88d 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -32,7 +32,6 @@
#:use-module ((guix build-system r) #:select (cran-uri bioconductor-uri))
#:use-module (guix upstream)
#:use-module (guix packages)
- #:use-module (gnu packages)
#:export (cran->guix-package
bioconductor->guix-package
%cran-updater
@@ -240,7 +239,7 @@ s-expression corresponding to that package, or #f on failure."
"Return an <upstream-source> for the latest release of PACKAGE."
(define upstream-name
- (package->upstream-name (specification->package package)))
+ (package->upstream-name package))
(define meta
(fetch-description %cran-url upstream-name))
@@ -249,7 +248,7 @@ s-expression corresponding to that package, or #f on failure."
(let ((version (assoc-ref meta "Version")))
;; CRAN does not provide signatures.
(upstream-source
- (package package)
+ (package (package-name package))
(version version)
(urls (cran-uri upstream-name version))))))
@@ -257,7 +256,7 @@ s-expression corresponding to that package, or #f on failure."
"Return an <upstream-source> for the latest release of PACKAGE."
(define upstream-name
- (package->upstream-name (specification->package package)))
+ (package->upstream-name package))
(define meta
(fetch-description %bioconductor-svn-url upstream-name))
@@ -266,7 +265,7 @@ s-expression corresponding to that package, or #f on failure."
(let ((version (assoc-ref meta "Version")))
;; Bioconductor does not provide signatures.
(upstream-source
- (package package)
+ (package (package-name package))
(version version)
(urls (bioconductor-uri upstream-name version))))))
diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
index 529de4f232..ccc4063a53 100644
--- a/guix/import/elpa.scm
+++ b/guix/import/elpa.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
-;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -239,13 +239,11 @@ type '<elpa-package>'."
;;;
(define (latest-release package)
- "Return an <upstream-release> for the latest release of PACKAGE. PACKAGE
-may be a Guix package name such as \"emacs-debbugs\" or an upstream name such
-as \"debbugs\"."
+ "Return an <upstream-release> for the latest release of PACKAGE."
(define name
- (if (string-prefix? "emacs-" package)
- (string-drop package 6)
- package))
+ (if (string-prefix? "emacs-" (package-name package))
+ (string-drop (package-name package) 6)
+ (package-name package)))
(let* ((repo 'gnu)
(info (elpa-package-info name repo))
@@ -256,7 +254,7 @@ as \"debbugs\"."
((_ raw-version reqs synopsis kind . rest)
(package-source-url kind name version repo)))))
(upstream-source
- (package package)
+ (package (package-name package))
(version version)
(urls (list url))
(signature-urls (list (string-append url ".sig"))))))
diff --git a/guix/import/gem.scm b/guix/import/gem.scm
index b46622f00d..fc06b0d748 100644
--- a/guix/import/gem.scm
+++ b/guix/import/gem.scm
@@ -32,7 +32,6 @@
#:use-module (guix licenses)
#:use-module (guix base32)
#:use-module (guix build-system ruby)
- #:use-module (gnu packages)
#:export (gem->guix-package
%gem-updater))
@@ -171,15 +170,14 @@ package on RubyGems."
((source-url ...)
(any rubygems-url? source-url))))))
-(define (latest-release guix-package)
- "Return an <upstream-source> for the latest release of GUIX-PACKAGE."
- (let* ((gem-name (guix-package->gem-name
- (specification->package guix-package)))
+(define (latest-release package)
+ "Return an <upstream-source> for the latest release of PACKAGE."
+ (let* ((gem-name (guix-package->gem-name package))
(metadata (rubygems-fetch gem-name))
(version (assoc-ref metadata "version"))
(url (rubygems-uri gem-name version)))
(upstream-source
- (package guix-package)
+ (package (package-name package))
(version version)
(urls (list url)))))
diff --git a/guix/import/github.scm b/guix/import/github.scm
index c696dcb363..29116d79f0 100644
--- a/guix/import/github.scm
+++ b/guix/import/github.scm
@@ -25,7 +25,6 @@
#:use-module (guix import utils)
#:use-module (guix packages)
#:use-module (guix upstream)
- #:use-module (gnu packages)
#:use-module (web uri)
#:export (%github-updater))
@@ -175,15 +174,14 @@ https://github.com/settings/tokens"))
(if (eq? (string-ref tag 0) #\v)
(substring tag 1) tag)))))))))
-(define (latest-release guix-package)
- "Return an <upstream-source> for the latest release of GUIX-PACKAGE."
- (let* ((pkg (specification->package guix-package))
- (source-uri (origin-uri (package-source pkg)))
+(define (latest-release pkg)
+ "Return an <upstream-source> for the latest release of PKG."
+ (let* ((source-uri (origin-uri (package-source pkg)))
(name (package-name pkg))
(newest-version (latest-released-version source-uri name)))
(if newest-version
(upstream-source
- (package pkg)
+ (package name)
(version newest-version)
(urls (list (updated-github-url pkg newest-version))))
#f))) ; On GitHub but no proper releases
diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm
index 640ead24f3..f07f453e11 100644
--- a/guix/import/hackage.scm
+++ b/guix/import/hackage.scm
@@ -23,7 +23,6 @@
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-11)
#:use-module (srfi srfi-1)
- #:use-module (gnu packages)
#:use-module ((guix download) #:select (download-to-store url-fetch))
#:use-module ((guix utils) #:select (package-name->name+version
canonical-newline-port))
@@ -269,10 +268,9 @@ respectively."
((source-url ...)
(any haskell-url? source-url))))))
-(define (latest-release guix-package)
- "Return an <upstream-source> for the latest release of GUIX-PACKAGE."
- (let* ((hackage-name (guix-package->hackage-name
- (specification->package guix-package)))
+(define (latest-release package)
+ "Return an <upstream-source> for the latest release of PACKAGE."
+ (let* ((hackage-name (guix-package->hackage-name package))
(cabal-meta (hackage-fetch hackage-name)))
(match cabal-meta
(#f
@@ -283,7 +281,7 @@ respectively."
((_ *** ("version" (version)))
(let ((url (hackage-source-url hackage-name version)))
(upstream-source
- (package guix-package)
+ (package (package-name package))
(version version)
(urls (list url))))))))
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index 8ae4948147..de30f4bea6 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -40,7 +40,6 @@
#:use-module (guix upstream)
#:use-module (guix licenses)
#:use-module (guix build-system python)
- #:use-module (gnu packages)
#:use-module (gnu packages python)
#:export (pypi->guix-package
%pypi-updater))
@@ -248,16 +247,15 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE."
((source-url ...)
(any pypi-url? source-url))))))
-(define (latest-release guix-package)
- "Return an <upstream-source> for the latest release of GUIX-PACKAGE."
+(define (latest-release package)
+ "Return an <upstream-source> for the latest release of PACKAGE."
(guard (c ((missing-source-error? c) #f))
- (let* ((pypi-name (guix-package->pypi-name
- (specification->package guix-package)))
+ (let* ((pypi-name (guix-package->pypi-name package))
(metadata (pypi-fetch pypi-name))
(version (assoc-ref* metadata "info" "version"))
(url (assoc-ref (latest-source-release metadata) "url")))
(upstream-source
- (package guix-package)
+ (package (package-name package))
(version version)
(urls (list url))))))