diff options
author | Marius Bakke <marius@gnu.org> | 2023-01-10 00:24:11 +0100 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2023-01-10 00:24:11 +0100 |
commit | d9bcd1a8d6300b79f5884e48b2cefff05de8dce4 (patch) | |
tree | e484be53fb1d3cd7c5bb76a34451c7364502d9ec /guix/derivations.scm | |
parent | 0d65f7daae7428b26a8141b83c2567e6d0d9d009 (diff) | |
parent | 79a9bb25bcb3d8b29968363db9b288cf3844108a (diff) |
Merge branch 'master' into staging
Diffstat (limited to 'guix/derivations.scm')
-rw-r--r-- | guix/derivations.scm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/guix/derivations.scm b/guix/derivations.scm index 354ec20e3f..0bb6a28147 100644 --- a/guix/derivations.scm +++ b/guix/derivations.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012-2021 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012-2021, 2023 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016, 2017 Mathieu Lirzin <mthl@gnu.org> ;;; ;;; This file is part of GNU Guix. @@ -484,17 +484,21 @@ things as appropriate and is thus more efficient." (fold-right (lambda (output result) (match output ((name path "" "") + ;; Regular derivation. (alist-cons name (make-derivation-output path #f #f #f) result)) ((name path hash-algo hash) - ;; fixed-output + ;; Fixed-output, unless HASH is the empty string (in that + ;; case, HASH-ALGO must be preserved despite being + ;; unused). (let* ((rec? (string-prefix? "r:" hash-algo)) (algo (string->symbol (if rec? (string-drop hash-algo 2) hash-algo))) - (hash (base16-string->bytevector hash))) + (hash (and (not (string-null? hash)) + (base16-string->bytevector hash)))) (alist-cons name (make-derivation-output path algo hash rec?) |