diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2020-05-19 15:55:08 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2020-05-22 01:29:39 +0200 |
| commit | ce0be5675b702b2ff89aed1772ebb42af4150243 (patch) | |
| tree | ec275112c97e9450ed9c4a8d30e7c153a7c10786 /tests/challenge.scm | |
| parent | 56f7ca6e7c8b5eadeee48b00bcbd78f9fa9e5f43 (diff) | |
packages: Introduce <content-hash> and use it in <origin>.
* guix/packages.scm (<content-hash>): New record type.
(define-content-hash-constructor, build-content-hash)
(content-hash): New macros.
(print-content-hash): New procedure.
(<origin>): Rename constructor to '%origin'.
[sha256]: Remove field.
[hash]: New field. Adjust users.
(origin-compatibility-helper, origin): New macros.
(origin-sha256): New deprecated procedure.
(origin->derivation): Adjust accordingly.
* tests/packages.scm ("package-source-derivation, origin, sha512"): New
test.
* guix/tests.scm: Hide (gcrypt hash) 'sha256' for proper syntax
matching.
* tests/challenge.scm: Add #:prefix for (gcrypt hash) and adjust users.
* tests/derivations.scm: Likewise.
* tests/store.scm: Likewise.
* tests/graph.scm ("bag DAG, including origins"): Provide 'sha256' field
with the right length.
* gnu/packages/aspell.scm (aspell-dictionary)
(aspell-dict-ca, aspell-dict-it): Use 'hash' and 'content-hash' for
proper syntax matching.
* gnu/packages/bash.scm (bash-patch): Rename 'sha256' to 'sha256-bv'.
* gnu/packages/bootstrap.scm (bootstrap-executable): Rename 'sha256' to 'bv'.
* gnu/packages/readline.scm (readline-patch): Likewise.
* gnu/packages/virtualization.scm (qemu-patch): Rename 'sha256' to
'sha256-bv'.
* guix/import/utils.scm: Hide (gcrypt hash) 'sha256'.
Diffstat (limited to 'tests/challenge.scm')
| -rw-r--r-- | tests/challenge.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/challenge.scm b/tests/challenge.scm index bb5633a3ebe..9c6d6e0d58f 100644 --- a/tests/challenge.scm +++ b/tests/challenge.scm | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2015, 2017, 2019 Ludovic Courtès <ludo@gnu.org> | 2 | ;;; Copyright © 2015, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; | 3 | ;;; |
| 4 | ;;; This file is part of GNU Guix. | 4 | ;;; This file is part of GNU Guix. |
| 5 | ;;; | 5 | ;;; |
| @@ -19,7 +19,7 @@ | |||
| 19 | (define-module (test-challenge) | 19 | (define-module (test-challenge) |
| 20 | #:use-module (guix tests) | 20 | #:use-module (guix tests) |
| 21 | #:use-module (guix tests http) | 21 | #:use-module (guix tests http) |
| 22 | #:use-module (gcrypt hash) | 22 | #:use-module ((gcrypt hash) #:prefix gcrypt:) |
| 23 | #:use-module (guix store) | 23 | #:use-module (guix store) |
| 24 | #:use-module (guix monads) | 24 | #:use-module (guix monads) |
| 25 | #:use-module (guix derivations) | 25 | #:use-module (guix derivations) |
| @@ -135,7 +135,7 @@ | |||
| 135 | (mlet* %store-monad ((drv (gexp->derivation "something" | 135 | (mlet* %store-monad ((drv (gexp->derivation "something" |
| 136 | #~(list #$output #$text))) | 136 | #~(list #$output #$text))) |
| 137 | (out -> (derivation->output-path drv)) | 137 | (out -> (derivation->output-path drv)) |
| 138 | (hash -> (sha256 #vu8()))) | 138 | (hash -> (gcrypt:sha256 #vu8()))) |
| 139 | (with-derivation-narinfo* drv (sha256 => hash) | 139 | (with-derivation-narinfo* drv (sha256 => hash) |
| 140 | (>>= (compare-contents (list out) (%test-substitute-urls)) | 140 | (>>= (compare-contents (list out) (%test-substitute-urls)) |
| 141 | (match-lambda | 141 | (match-lambda |
