summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/build.scm2
-rw-r--r--doc/guix.texi102
2 files changed, 74 insertions, 30 deletions
diff --git a/doc/build.scm b/doc/build.scm
index 72792b42d2..564b0e1591 100644
--- a/doc/build.scm
+++ b/doc/build.scm
@@ -714,7 +714,7 @@ makeinfo OPTIONS."
;; accented letters.
;;
;; (define texlive
- ;; (texlive-union (list texlive-tex-texinfo
+ ;; (texlive-updmap.cfg (list texlive-tex-texinfo
;; texlive-generic-epsf
;; texlive-fonts-ec)))
diff --git a/doc/guix.texi b/doc/guix.texi
index 094d1acd2c..4b33d5b2f7 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -2782,8 +2782,8 @@ you should add them to @file{~/.bash_profile} (or equivalent file if you
do not use Bash) so that environment variables are set next time you
spawn a shell. You only need to do this once and other search paths
environment variables will be taken care of similarly---e.g., if you
-eventually install @code{python} and Python libraries, @code{PYTHONPATH}
-will be defined.
+eventually install @code{python} and Python libraries,
+@env{GUIX_PYTHONPATH} will be defined.
You can go on installing packages at your will. To list installed
packages, run:
@@ -3527,24 +3527,26 @@ Show details about @var{package}, taken from the list of available packages, in
recutils manual}).
@example
-$ guix package --show=python | recsel -p name,version
-name: python
-version: 2.7.6
+$ guix package --show=guile | recsel -p name,version
+name: guile
+version: 3.0.5
-name: python
-version: 3.3.5
+name: guile
+version: 3.0.2
+
+name: guile
+version: 2.2.7
+@dots{}
@end example
You may also specify the full name of a package to only get details about a
specific version of it (this time using the @command{guix show} alias):
@example
-$ guix show python@@3.4 | recsel -p name,version
-name: python
-version: 3.4.3
+$ guix show guile@@3.0.5 | recsel -p name,version
+name: guile
+version: 3.0.5
@end example
-
-
@item --list-installed[=@var{regexp}]
@itemx -I [@var{regexp}]
List the currently installed packages in the specified profile, with the
@@ -5624,11 +5626,11 @@ guix environment guile -- make -j4
In other situations, it is more convenient to specify the list of
packages needed in the environment. For example, the following command
-runs @command{python} from an environment containing Python@tie{}2.7 and
+runs @command{python} from an environment containing Python@tie{}3 and
NumPy:
@example
-guix environment --ad-hoc python2-numpy python-2.7 -- python
+guix environment --ad-hoc python-numpy python -- python3
@end example
Furthermore, one might want the dependencies of a package and also some
@@ -7928,8 +7930,9 @@ packages, which consists in running @code{python setup.py build} and
then @code{python setup.py install --prefix=/gnu/store/@dots{}}.
For packages that install stand-alone Python programs under @code{bin/},
-it takes care of wrapping these programs so that their @env{PYTHONPATH}
-environment variable points to all the Python libraries they depend on.
+it takes care of wrapping these programs so that their
+@env{GUIX_PYTHONPATH} environment variable points to all the Python
+libraries they depend on.
Which Python package is used to perform the build can be specified with
the @code{#:python} parameter. This is a useful way to force a package
@@ -7941,6 +7944,13 @@ By default guix calls @code{setup.py} under control of
@code{setuptools}, much like @command{pip} does. Some packages are not
compatible with setuptools (and pip), thus you can disable this by
setting the @code{#:use-setuptools?} parameter to @code{#f}.
+
+If a @code{"python"} output is available, the package is installed into it
+instead of the default @code{"out"} output. This is useful for packages that
+include a Python package as only a part of the software, and thus want to
+combine the phases of @code{python-build-system} with another build system.
+Python bindings are a common usecase.
+
@end defvr
@defvr {Scheme Variable} perl-build-system
@@ -8161,9 +8171,7 @@ implements the build procedure for packages that use
It adds both Meson and @uref{https://ninja-build.org/, Ninja} to the set
of inputs, and they can be changed with the parameters @code{#:meson}
-and @code{#:ninja} if needed. The default Meson is
-@code{meson-for-build}, which is special because it doesn't clear the
-@code{RUNPATH} of binaries and libraries when they are installed.
+and @code{#:ninja} if needed.
This build system is an extension of @code{gnu-build-system}, but with the
following phases changed to some specific for Meson:
@@ -8194,11 +8202,11 @@ Apart from that, the build system also adds the following phases:
@item fix-runpath
This phase ensures that all binaries can find the libraries they need.
-It searches for required libraries in subdirectories of the package being
-built, and adds those to @code{RUNPATH} where needed. It also removes
-references to libraries left over from the build phase by
-@code{meson-for-build}, such as test dependencies, that aren't actually
-required for the program to run.
+It searches for required libraries in subdirectories of the package
+being built, and adds those to @code{RUNPATH} where needed. It also
+removes references to libraries left over from the build phase by
+@code{meson}, such as test dependencies, that aren't actually required
+for the program to run.
@item glib-or-gtk-wrap
This phase is the phase provided by @code{glib-or-gtk-build-system}, and it
@@ -8577,12 +8585,14 @@ Make @var{file} writable for its owner.
@end deffn
@deffn {Scheme Procedure} copy-recursively @var{source} @var{destination} @
- [#:log (current-output-port)] [#:follow-symlinks? #f] [#:keep-mtime? #f]
+ [#:log (current-output-port)] [#:follow-symlinks? #f] @
+ [#:copy-file copy-file] [#:keep-mtime? #f] [#:keep-permissions? #t]
Copy @var{source} directory to @var{destination}. Follow symlinks if
-@var{follow-symlinks?} is true; otherwise, just preserve them. When
-@var{keep-mtime?} is true, keep the modification time of the files in
-@var{source} on those of @var{destination}. Write verbose output to the
-@var{log} port.
+@var{follow-symlinks?} is true; otherwise, just preserve them. Call
+@var{copy-file} to copy regular files. When @var{keep-mtime?} is true,
+keep the modification time of the files in @var{source} on those of
+@var{destination}. When @var{keep-permissions?} is true, preserve file
+permissions. Write verbose output to the @var{log} port.
@end deffn
@deffn {Scheme Procedure} delete-file-recursively @var{dir} @
@@ -8666,6 +8676,26 @@ Return the complete file name for @var{program} as found in
@code{$PATH}, or @code{#f} if @var{program} could not be found.
@end deffn
+@deffn {Scheme Procedure} search-input-file @var{inputs} @var{name}
+Return the complete file name for @var{name} as found in @var{inputs}.
+If @var{name} could not be found, an exception is raised instead.
+Here, @var{inputs} is an association list like @var{inputs} and
+@var{native-inputs} as available to build phases.
+@end deffn
+
+Here is a (simplified) example of how @code{search-input-file} is used
+in a build phase of the @code{wireguard-tools} package:
+
+@lisp
+(add-after 'install 'wrap-wg-quick
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((coreutils (string-append (assoc-ref inputs "coreutils")
+ "/bin")))
+ (wrap-program (search-input-file outputs "bin/wg-quick")
+ #:sh (search-input-file inputs "bin/bash")
+ `("PATH" ":" prefix ,(list coreutils))))))
+@end lisp
+
@subsection Build Phases
@cindex build phases
@@ -34771,6 +34801,20 @@ GDB}):
From there on, GDB will pick up debugging information from the
@file{.debug} files under @file{~/.guix-profile/lib/debug}.
+Below is an alternative GDB script which is useful when working with
+other profiles. It takes advantage of the optional Guile integration in
+GDB. This snippet is included by default on Guix System in the
+@file{~/.gdbinit} file.
+
+@example
+guile
+(use-modules (gdb))
+(execute (string-append "set debug-file-directory "
+ (or (getenv "GDB_DEBUG_FILE_DIRECTORY")
+ "~/.guix-profile/lib/debug")))
+end
+@end example
+
In addition, you will most likely want GDB to be able to show the source
code being debugged. To do that, you will have to unpack the source
code of the package of interest (obtained with @code{guix build