From 3c2cd351d49041373a74897472e905b38697489f Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Tue, 2 Aug 2022 11:07:36 -0600 Subject: [PATCH] Add example error message. --- doc/builders/fetchers.chapter.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/builders/fetchers.chapter.md b/doc/builders/fetchers.chapter.md index f4c81d4d269d..947afe8e9fdb 100644 --- a/doc/builders/fetchers.chapter.md +++ b/doc/builders/fetchers.chapter.md @@ -39,7 +39,11 @@ fetchurl { Use the resulting error message to determine the correct hash. - +``` +error: hash mismatch in fixed-output derivation '/path/to/my.drv': + specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + got: sha256-RApQUm78dswhBLC/rfU9y0u6pSAzHceIJqgmetRD24E= +``` A similar problem arises while testing changes to a fetcher's implementation. If the output of the derivation already exists in the Nix store, test failures can go undetected. The [`invalidateFetcherByDrvHash`](#tester-invalidateFetcherByDrvHash) function helps prevent reusing cached derivations.