diff options
author | Ludovic Courtès <ludo@gnu.org> | 2012-07-01 17:32:03 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2012-07-03 23:50:29 +0200 |
commit | 90c68be8835504da3f5addfe36a782ea692c3cf6 (patch) | |
tree | 8be346fca3aa868f48517ecb7e2cf06675224440 | |
parent | 8fd5bd2b69b51e370144f26c01201a178c024483 (diff) | |
download | 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.
-rw-r--r-- | distro/base.scm | 16 | ||||
-rw-r--r-- | guix/packages.scm | 34 |
2 files changed, 27 insertions, 23 deletions
diff --git a/distro/base.scm b/distro/base.scm index ca98bf0d69..1135d7551e 100644 --- a/distro/base.scm +++ b/distro/base.scm @@ -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) 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 |