summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi16
-rw-r--r--doc/package-hello.scm18
2 files changed, 34 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 2b61574c84..7c063bf359 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -1167,6 +1167,22 @@ Note that this option installs the first output of the specified
 package, which may be insufficient when needing a specific output of a
 multiple-output package.
 
+@item --install-from-file=@var{file}
+@itemx -f @var{file}
+Install the package that the code within @var{file} evaluates to.
+
+As an example, @var{file} might contain a definition like this
+(@pxref{Defining Packages}):
+
+@example
+@verbatiminclude package-hello.scm
+@end example
+
+Developers may find it useful to include such a @file{package.scm} file
+in the root of their project's source tree that can be used to test
+development snapshots and create reproducible development environments
+(@pxref{Invoking guix environment}).
+
 @item --remove=@var{package} @dots{}
 @itemx -r @var{package} @dots{}
 Remove the specified @var{package}s.
diff --git a/doc/package-hello.scm b/doc/package-hello.scm
new file mode 100644
index 0000000000..b3fcd4ff73
--- /dev/null
+++ b/doc/package-hello.scm
@@ -0,0 +1,18 @@
+(use-modules (guix)
+             (guix build-system gnu)
+             (guix licenses))
+
+(package
+  (name "hello")
+  (version "2.8")
+  (source (origin
+            (method url-fetch)
+            (uri (string-append "mirror://gnu/hello/hello-" version
+                                ".tar.gz"))
+            (sha256
+             (base32 "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6"))))
+  (build-system gnu-build-system)
+  (synopsis "Hello, GNU world: An example GNU package")
+  (description "Guess what GNU Hello prints!")
+  (home-page "http://www.gnu.org/software/hello/")
+  (license gpl3+))