Next: , Up: Invocando guix build   [Contents][Index]


10.1.1 Opções de compilação comum

A number of options that control the build process are common to guix build and other commands that can spawn builds, such as guix package or guix archive. These are the following:

--load-path=directory
-L diretório

Add directory to the front of the package module search path (see Módulos de pacote).

This allows users to define their own packages and make them visible to the command-line tools.

--keep-failed
-K

Keep the build tree of failed builds. Thus, if a build fails, its build tree is kept under /tmp, in a directory whose name is shown at the end of the build log. This is useful when debugging build issues. See Depurando falhas de compilação, for tips and tricks on how to debug build issues.

This option implies --no-offload, and it has no effect when connecting to a remote daemon with a guix:// URI (see the GUIX_DAEMON_SOCKET variable).

--keep-going
-k

Keep going when some of the derivations fail to build; return only once all the builds have either completed or failed.

The default behavior is to stop as soon as one of the specified derivations has failed.

--dry-run
-n

Do not build the derivations.

--fallback

When substituting a pre-built binary fails, fall back to building packages locally (see Falha na substituição).

--substitute-urls=urls

Consider urls the whitespace-separated list of substitute source URLs, overriding the default list of URLs of guix-daemon (see guix-daemon URLs).

This means that substitutes may be downloaded from urls, provided they are signed by a key authorized by the system administrator (see Substitutos).

When urls is the empty string, substitutes are effectively disabled.

--no-substitutes

Não use substitutos para compilar produtos. Ou seja, sempre crie coisas localmente, em vez de permitir downloads de binários pré-compilados (see Substitutos).

--no-grafts

Do not “graft” packages. In practice, this means that package updates available as grafts are not applied. See Atualizações de segurança, for more information on grafts.

--rounds=n

Build each derivation n times in a row, and raise an error if consecutive build results are not bit-for-bit identical.

This is a useful way to detect non-deterministic builds processes. Non-deterministic build processes are a problem because they make it practically impossible for users to verify whether third-party binaries are genuine. See Invocando guix challenge, for more.

Quando usado em conjunto com --keep-failed, uma saída de comparação é mantida no armazém, sob /gnu/store/…-check. Isso facilita procurar por diferenças entre os dois resultados.

--no-offload

Do not use offload builds to other machines (see Usando o recurso de descarregamento). That is, always build things locally instead of offloading builds to remote machines.

--max-silent-time=segundos

Quando o processo de compilação ou substituição permanecer em silêncio por mais de segundos, encerra-o e relata uma falha de compilação.

By default, the daemon’s setting is honored (see --max-silent-time).

--timeout=segundos

Da mesma forma, quando o processo de compilação ou substituição durar mais que segundos, encerra-o e relata uma falha de compilação.

By default, the daemon’s setting is honored (see --timeout).

-v level
--verbosity=level

Use the given verbosity level, an integer. Choosing 0 means that no output is produced, 1 is for quiet output; 2 is similar to 1 but it additionally displays download URLs; 3 shows all the build log output on standard error.

--cores=n
-c n

Allow the use of up to n CPU cores for the build. The special value 0 means to use as many CPU cores as available.

--max-jobs=n
-M n

Allow at most n build jobs in parallel. See --max-jobs, for details about this option and the equivalent guix-daemon option.

--debug=level

Produce debugging output coming from the build daemon. level must be an integer between 0 and 5; higher means more verbose output. Setting a level of 4 or more may be helpful when debugging setup issues with the build daemon.

Behind the scenes, guix build is essentially an interface to the package-derivation procedure of the (guix packages) module, and to the build-derivations procedure of the (guix derivations) module.

In addition to options explicitly passed on the command line, guix build and other guix commands that support building honor the GUIX_BUILD_OPTIONS environment variable.

Environment Variable: GUIX_BUILD_OPTIONS

Users can define this variable to a list of command line options that will automatically be used by guix build and other guix commands that can perform builds, as in the example below:

$ export GUIX_BUILD_OPTIONS="--no-substitutes -c 2 -L /foo/bar"

These options are parsed independently, and the result is appended to the parsed command-line options.


Next: Opções de transformação de pacote, Up: Invocando guix build   [Contents][Index]