doc: cookbook: Use @file for file names and extensions.
* doc/guix-cookbook.texi (@samp{GUIX_PACKAGE_PATH}): (Extended example): (Setting up a bind mount): (Basic setup with manifests): (Default profile): Use @file instead of @samp or @code for file names and extensions.
This commit is contained in:
parent
cc765e478a
commit
2c8305d140
@ -581,7 +581,7 @@ packages.
|
|||||||
Guix makes it possible to streamline the process by adding as many ``package
|
Guix makes it possible to streamline the process by adding as many ``package
|
||||||
declaration directories'' as you want.
|
declaration directories'' as you want.
|
||||||
|
|
||||||
Create a directory, say @samp{~./guix-packages} and add it to the @samp{GUIX_PACKAGE_PATH}
|
Create a directory, say @file{~./guix-packages} and add it to the @samp{GUIX_PACKAGE_PATH}
|
||||||
environment variable:
|
environment variable:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
@ -851,7 +851,7 @@ version when packaging programs for a specific commit.
|
|||||||
@subsubsection Snippets
|
@subsubsection Snippets
|
||||||
|
|
||||||
Snippets are quoted (i.e. non-evaluated) Scheme code that are a means of patching
|
Snippets are quoted (i.e. non-evaluated) Scheme code that are a means of patching
|
||||||
the source. They are a Guix-y alternative to the traditional @samp{.patch} files.
|
the source. They are a Guix-y alternative to the traditional @file{.patch} files.
|
||||||
Because of the quote, the code in only evaluated when passed to the Guix daemon
|
Because of the quote, the code in only evaluated when passed to the Guix daemon
|
||||||
for building. There can be as many snippets as needed.
|
for building. There can be as many snippets as needed.
|
||||||
|
|
||||||
@ -955,7 +955,7 @@ $ make CC=gcc prefix=/gnu/store/...-<out>
|
|||||||
This sets the C compiler to @code{gcc} and the @code{prefix} variable (the installation
|
This sets the C compiler to @code{gcc} and the @code{prefix} variable (the installation
|
||||||
directory in Make parlance) to @code{(assoc-ref %outputs "out")}, which is a build-stage
|
directory in Make parlance) to @code{(assoc-ref %outputs "out")}, which is a build-stage
|
||||||
global variable pointing to the destination directory in the store (something like
|
global variable pointing to the destination directory in the store (something like
|
||||||
@samp{/gnu/store/...-my-libgit2-20180408}).
|
@file{/gnu/store/...-my-libgit2-20180408}).
|
||||||
|
|
||||||
Similarly, it's possible to set the configure flags:
|
Similarly, it's possible to set the configure flags:
|
||||||
|
|
||||||
@ -1622,8 +1622,8 @@ Then you need to add the following code to a StumpWM configuration file
|
|||||||
To bind mount a file system, one must first set up some definitions
|
To bind mount a file system, one must first set up some definitions
|
||||||
before the @code{operating-system} section of the system definition. In
|
before the @code{operating-system} section of the system definition. In
|
||||||
this example we will bind mount a folder from a spinning disk drive to
|
this example we will bind mount a folder from a spinning disk drive to
|
||||||
@code{/tmp}, to save wear and tear on the primary SSD, without
|
@file{/tmp}, to save wear and tear on the primary SSD, without
|
||||||
dedicating an entire partition to be mounted as @code{/tmp}.
|
dedicating an entire partition to be mounted as @file{/tmp}.
|
||||||
|
|
||||||
First, the source drive that hosts the folder we wish to bind mount
|
First, the source drive that hosts the folder we wish to bind mount
|
||||||
should be defined, so that the bind mount can depend on it.
|
should be defined, so that the bind mount can depend on it.
|
||||||
@ -1801,9 +1801,9 @@ Note that it's also possible to loop over the output of
|
|||||||
guix package --list-profiles
|
guix package --list-profiles
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
although you'll probably have to filter out @samp{~/.config/guix/current}.
|
although you'll probably have to filter out @file{~/.config/guix/current}.
|
||||||
|
|
||||||
To enable all profiles on login, add this to your @samp{~/.bash_profile} (or similar):
|
To enable all profiles on login, add this to your @file{~/.bash_profile} (or similar):
|
||||||
|
|
||||||
@example
|
@example
|
||||||
for i in $GUIX_EXTRA_PROFILES/*; do
|
for i in $GUIX_EXTRA_PROFILES/*; do
|
||||||
@ -1817,8 +1817,8 @@ done
|
|||||||
@end example
|
@end example
|
||||||
|
|
||||||
Note to Guix System users: the above reflects how your default profile
|
Note to Guix System users: the above reflects how your default profile
|
||||||
@samp{~/.guix-profile} is activated from @samp{/etc/profile}, that latter being loaded by
|
@file{~/.guix-profile} is activated from @file{/etc/profile}, that latter being loaded by
|
||||||
@samp{~/.bashrc} by default.
|
@file{~/.bashrc} by default.
|
||||||
|
|
||||||
You can obviously choose to only enable a subset of them:
|
You can obviously choose to only enable a subset of them:
|
||||||
|
|
||||||
@ -1861,7 +1861,7 @@ guix package -m /path/to/guix-my-project-manifest.scm -p "$GUIX_EXTRA_PROFILES"/
|
|||||||
|
|
||||||
To upgrade all profiles, it's easy enough to loop over them. For instance,
|
To upgrade all profiles, it's easy enough to loop over them. For instance,
|
||||||
assuming your manifest specifications are stored in
|
assuming your manifest specifications are stored in
|
||||||
@samp{~/.guix-manifests/guix-$profile-manifest.scm}, with @samp{$profile} being the name
|
@file{~/.guix-manifests/guix-$profile-manifest.scm}, with @samp{$profile} being the name
|
||||||
of the profile (e.g.@: "project1"), you could do the following in Bourne shell:
|
of the profile (e.g.@: "project1"), you could do the following in Bourne shell:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
@ -1921,7 +1921,7 @@ The same is true for @samp{INFOPATH} (you can install @samp{info-reader}),
|
|||||||
@node Default profile
|
@node Default profile
|
||||||
@subsection Default profile
|
@subsection Default profile
|
||||||
|
|
||||||
What about the default profile that Guix keeps in @samp{~/.guix-profile}?
|
What about the default profile that Guix keeps in @file{~/.guix-profile}?
|
||||||
|
|
||||||
You can assign it the role you want. Typically you would install the manifest
|
You can assign it the role you want. Typically you would install the manifest
|
||||||
of the packages you want to use all the time.
|
of the packages you want to use all the time.
|
||||||
|
Loading…
Reference in New Issue
Block a user