doc: Use the recommended Scheme format.

Apply the recommended formatting rules from '.dir-locals.el' to the
examples in the manual in order to fulfill it's purpose of being a
reference.

* doc/package-hello.scm: Indent it.
* doc/guix.texi (Defining Packages, Version Numbers): Likewise.
* gnu/packages/base.scm (hello): Be consistent with the manual.
This commit is contained in:
Mathieu Lirzin 2015-09-13 22:26:37 +02:00
parent 9c38b54027
commit 17d8e33f31
3 changed files with 34 additions and 31 deletions

View File

@ -1963,13 +1963,14 @@ package looks like this:
(define-public hello (define-public hello
(package (package
(name "hello") (name "hello")
(version "2.8") (version "2.10")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://gnu/hello/hello-" version (uri (string-append "mirror://gnu/hello/hello-" version
".tar.gz")) ".tar.gz"))
(sha256 (sha256
(base32 "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6")))) (base32
"0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments `(#:configure-flags '("--enable-silent-rules"))) (arguments `(#:configure-flags '("--enable-silent-rules")))
(inputs `(("gawk" ,gawk))) (inputs `(("gawk" ,gawk)))
@ -7232,22 +7233,22 @@ For instance, the versions 2.24.20 and 3.9.12 of GTK+ may be packaged as follows
@example @example
(define-public gtk+ (define-public gtk+
(package (package
(name "gtk+") (name "gtk+")
(version "3.9.12") (version "3.9.12")
...)) ...))
(define-public gtk+-2 (define-public gtk+-2
(package (package
(name "gtk+") (name "gtk+")
(version "2.24.20") (version "2.24.20")
...)) ...))
@end example @end example
If we also wanted GTK+ 3.8.2, this would be packaged as If we also wanted GTK+ 3.8.2, this would be packaged as
@example @example
(define-public gtk+-3.8 (define-public gtk+-3.8
(package (package
(name "gtk+") (name "gtk+")
(version "3.8.2") (version "3.8.2")
...)) ...))
@end example @end example

View File

@ -4,13 +4,14 @@
(package (package
(name "hello") (name "hello")
(version "2.8") (version "2.10")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://gnu/hello/hello-" version (uri (string-append "mirror://gnu/hello/hello-" version
".tar.gz")) ".tar.gz"))
(sha256 (sha256
(base32 "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6")))) (base32
"0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(synopsis "Hello, GNU world: An example GNU package") (synopsis "Hello, GNU world: An example GNU package")
(description "Guess what GNU Hello prints!") (description "Guess what GNU Hello prints!")

View File

@ -49,22 +49,23 @@
(define-public hello (define-public hello
(package (package
(name "hello") (name "hello")
(version "2.10") (version "2.10")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://gnu/hello/hello-" version (uri (string-append "mirror://gnu/hello/hello-" version
".tar.gz")) ".tar.gz"))
(sha256 (sha256
(base32 "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i")))) (base32
(build-system gnu-build-system) "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))))
(synopsis "Hello, GNU world: An example GNU package") (build-system gnu-build-system)
(description (synopsis "Hello, GNU world: An example GNU package")
"GNU Hello prints the message \"Hello, world!\" and then exits. It (description
"GNU Hello prints the message \"Hello, world!\" and then exits. It
serves as an example of standard GNU coding practices. As such, it supports serves as an example of standard GNU coding practices. As such, it supports
command-line arguments, multiple languages, and so on.") command-line arguments, multiple languages, and so on.")
(home-page "http://www.gnu.org/software/hello/") (home-page "http://www.gnu.org/software/hello/")
(license gpl3+))) (license gpl3+)))
(define-public grep (define-public grep
(package (package