summaryrefslogtreecommitdiff
path: root/guix/packages.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-07-01 17:32:03 +0200
committerLudovic Courtès <ludo@gnu.org>2012-07-03 23:50:29 +0200
commit90c68be8835504da3f5addfe36a782ea692c3cf6 (patch)
tree8be346fca3aa868f48517ecb7e2cf06675224440 /guix/packages.scm
parent8fd5bd2b69b51e370144f26c01201a178c024483 (diff)
downloadgnu-guix-90c68be8835504da3f5addfe36a782ea692c3cf6.tar
gnu-guix-90c68be8835504da3f5addfe36a782ea692c3cf6.tar.gz
Rename <package-source> to <origin>; use the `letrec*' behavior in packages.
* guix/packages.scm (<package-source>): Rename to... (<origin>): ... this. Update users. * distro/base.scm (libsigsegv, gawk, hello): Adjust to renaming; refer to VERSION to build the URL.
Diffstat (limited to 'guix/packages.scm')
-rw-r--r--guix/packages.scm34
1 files changed, 17 insertions, 17 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index 1d0cf229b7..871b495542 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -29,12 +29,12 @@
location-line
location-column
- source
- package-source?
- package-source-uri
- package-source-method
- package-source-sha256
- package-source-file-name
+ origin
+ origin?
+ origin-uri
+ origin-method
+ origin-sha256
+ origin-file-name
base32
package
@@ -93,15 +93,15 @@ etc."
(location file (and line (+ line 1)) col)))
-;; The source of a package, such as a tarball URL and fetcher.
-(define-record-type* <package-source>
- source make-package-source
- package-source?
- (uri package-source-uri) ; string
- (method package-source-method) ; symbol
- (sha256 package-source-sha256) ; bytevector
- (file-name package-source-file-name ; optional file name
- (default #f)))
+;; The source of a package, such as a tarball URL and fetcher---called
+;; "origin" to avoid name clash with `package-source', `source', etc.
+(define-record-type* <origin>
+ origin make-origin
+ origin?
+ (uri origin-uri) ; string
+ (method origin-method) ; symbol
+ (sha256 origin-sha256) ; bytevector
+ (file-name origin-file-name (default #f))) ; optional file name
(define-syntax base32
(lambda (s)
@@ -120,7 +120,7 @@ representation."
package?
(name package-name) ; string
(version package-version) ; string
- (source package-source) ; <package-source> instance
+ (source package-source) ; <origin> instance
(build-system package-build-system) ; build system
(arguments package-arguments ; arguments for the build method
(default '()))
@@ -155,7 +155,7 @@ representation."
(define (package-source-derivation store source)
"Return the derivation path for SOURCE, a package source."
(match source
- (($ <package-source> uri method sha256 name)
+ (($ <origin> uri method sha256 name)
(method store uri 'sha256 sha256 name))))
(define* (package-derivation store package