me
/
guix
Archived
1
0
Fork 0

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.
master
Ludovic Courtès 2012-07-01 17:32:03 +02:00
parent 8fd5bd2b69
commit 90c68be883
2 changed files with 27 additions and 23 deletions

View File

@ -32,9 +32,11 @@
(package
(name "libsigsegv")
(version "2.10")
(source (source
(source (origin
(method http-fetch)
(uri "http://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.10.tar.gz")
(uri (string-append
"http://ftp.gnu.org/gnu/libsigsegv/libsigsegv-"
version ".tar.gz"))
(sha256
(base32 "16hrs8k3nmc7a8jam5j1fpspd6sdpkamskvsdpcw6m29vnis8q44"))))
(build-system gnu-build-system)
@ -54,9 +56,10 @@ handlers, distributed shared memory, and more.")
(package
(name "gawk")
(version "4.0.0")
(source (source
(source (origin
(method http-fetch)
(uri "http://ftp.gnu.org/gnu/gawk/gawk-4.0.0.tar.bz2")
(uri (string-append "http://ftp.gnu.org/gnu/gawk/gawk-" version
".tar.bz2"))
(sha256
(base32 "0sss7rhpvizi2a88h6giv0i7w5h07s2fxkw3s6n1hqvcnhrfgbb0"))))
(build-system gnu-build-system)
@ -88,9 +91,10 @@ code.")
(package
(name "hello")
(version "2.8")
(source (source
(source (origin
(method http-fetch)
(uri "http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz")
(uri (string-append "http://ftp.gnu.org/gnu/hello/hello-" version
".tar.gz"))
(sha256
(base32 "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6"))))
(build-system gnu-build-system)

View File

@ -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