From 90c68be8835504da3f5addfe36a782ea692c3cf6 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 1 Jul 2012 17:32:03 +0200 Subject: Rename to ; use the `letrec*' behavior in packages. * guix/packages.scm (): Rename to... (): ... this. Update users. * distro/base.scm (libsigsegv, gawk, hello): Adjust to renaming; refer to VERSION to build the URL. --- distro/base.scm | 16 ++++++++++------ 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* - 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 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) ; instance + (source package-source) ; 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 - (($ uri method sha256 name) + (($ uri method sha256 name) (method store uri 'sha256 sha256 name)))) (define* (package-derivation store package -- cgit 1.4.1