doc: Document building and installing from JSON files.

* doc/guix.texi (Invoking guix package): Augment pargraphs for
"--install-from-file".
(Invoking guix build): Document building from JSON files.
* doc/package-hello.json: New file.
* doc/local.mk (EXTRA_DIST): Add it.
This commit is contained in:
Ricardo Wurmus 2020-04-16 22:22:51 +02:00
parent 3c0422b9be
commit c9f321e52a
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
3 changed files with 51 additions and 1 deletions

View File

@ -2824,6 +2824,15 @@ in the root of their project source tree that can be used to test
development snapshots and create reproducible development environments
(@pxref{Invoking guix environment}).
The @var{file} may also contain a JSON representation of one or more
package definitions. Running @code{guix package -f} on
@file{hello.json} with the following contents would result in installing
the package @code{greeter} after building @code{myhello}:
@example
@verbatiminclude package-hello.json
@end example
@item --remove=@var{package} @dots{}
@itemx -r @var{package} @dots{}
Remove the specified @var{package}s.
@ -8550,6 +8559,15 @@ As an example, @var{file} might contain a package definition like this
@include package-hello.scm
@end lisp
The @var{file} may also contain a JSON representation of one or more
package definitions. Running @code{guix build -f} on @file{hello.json}
with the following contents would result in building the packages
@code{myhello} and @code{greeter}:
@example
@verbatiminclude package-hello.json
@end example
@item --manifest=@var{manifest}
@itemx -m @var{manifest}
Build all packages listed in the given @var{manifest}

View File

@ -53,7 +53,8 @@ EXTRA_DIST += \
$(DOT_VECTOR_GRAPHICS) \
%D%/images/coreutils-size-map.eps \
%D%/environment-gdb.scm \
%D%/package-hello.scm
%D%/package-hello.scm \
%D%/package-hello.json
OS_CONFIG_EXAMPLES_TEXI = \
%D%/os-config-bare-bones.texi \

31
doc/package-hello.json Normal file
View File

@ -0,0 +1,31 @@
[
{
"name": "myhello",
"version": "2.10",
"source": "mirror://gnu/hello/hello-2.10.tar.gz",
"build-system": "gnu",
"arguments": {
"tests?": false
}
"home-page": "https://www.gnu.org/software/hello/",
"synopsis": "Hello, GNU world: An example GNU package",
"description": "GNU Hello prints a greeting.",
"license": "GPL-3.0+",
"native-inputs": ["gettext"]
},
{
"name": "greeter",
"version": "1.0",
"source": "https://example.com/greeter-1.0.tar.gz",
"build-system": "gnu",
"arguments": {
"test-target": "foo",
"parallel-build?": false,
},
"home-page": "https://example.com/",
"synopsis": "Greeter using GNU Hello",
"description": "This is a wrapper around GNU Hello.",
"license": "GPL-3.0+",
"inputs": ["myhello", "hello"]
}
]