From e4adc665e1ce4fe5341eda12157460ac3bd87aec Mon Sep 17 00:00:00 2001 From: Attila Lendvai Date: Sun, 3 Oct 2021 14:43:01 +0200 Subject: 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 --- guix/build/graft.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guix/build/graft.scm') 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? -- cgit v1.2.3