diff options
author | Attila Lendvai <attila@lendvai.name> | 2021-10-03 14:43:01 +0200 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2022-09-02 17:04:46 +0200 |
commit | e4adc665e1ce4fe5341eda12157460ac3bd87aec (patch) | |
tree | d49a6d46ba0e957515bb25e4e83241d82dc1e228 /guix/build/graft.scm | |
parent | 54c365d6457fd19479f3cea797196240a73299bf (diff) | |
download | guix-patches-e4adc665e1ce4fe5341eda12157460ac3bd87aec.tar guix-patches-e4adc665e1ce4fe5341eda12157460ac3bd87aec.tar.gz |
guix: build: Avoid using magic literals in the code for hash length.
* guix/build/utils.scm (%store-hash-string-length): New constant.
(store-path-prefix-length): Factor out the calculation of the total store
prefix length.
* guix/build/graft.scm (hash-length): Use it.
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'guix/build/graft.scm')
-rw-r--r-- | guix/build/graft.scm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guix/build/graft.scm b/guix/build/graft.scm index daac958d4f..281dbaba6f 100644 --- a/guix/build/graft.scm +++ b/guix/build/graft.scm @@ -44,7 +44,7 @@ ;;; ;;; Code: -(define-constant hash-length 32) +(define-constant hash-length %store-hash-string-length) (define nix-base32-char? (cute char-set-contains? |