Next: Invoking guix import, Previous: Invoking guix download, Up: Utilities [Contents][Index]
guix hash
The guix hash
command computes the SHA256 hash of a file.
It is primarily a convenience tool for anyone contributing to the
distribution: it computes the cryptographic hash of a file, which can be
used in the definition of a package (see Defining Packages).
The general syntax is:
guix hash option file
guix hash
has the following option:
--format=fmt
-f fmt
Write the hash in the format specified by fmt.
Supported formats: nix-base32
, base32
, base16
(hex
and hexadecimal
can be used as well).
If the --format option is not specified, guix hash
will output the hash in nix-base32
. This representation is used
in the definitions of packages.
--recursive
-r
Compute the hash on file recursively.
In this case, the hash is computed on an archive containing file, including its children if it is a directory. Some of file’s meta-data is part of the archive; for instance, when file is a regular file, the hash is different depending on whether file is executable or not. Meta-data such as time stamps has no impact on the hash (see Invoking guix archive).