summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/guix.texi18
-rw-r--r--doc/local.mk3
-rw-r--r--doc/package-hello.json31
3 files changed, 51 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 5c4f90cfcb..a475ebb45a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -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}
diff --git a/doc/local.mk b/doc/local.mk
index 3805593172..30c4a8c34d 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -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 \
diff --git a/doc/package-hello.json b/doc/package-hello.json
new file mode 100644
index 0000000000..a47e266e4b
--- /dev/null
+++ b/doc/package-hello.json
@@ -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"]
+ }
+]