From 681af17460fa34916ac40589cccdcca7222249af Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 24 Dec 2020 15:50:54 +0000 Subject: guix: Move narinfo code from substitute script to module. This separation between the code for dealing with narinfos from the code doing that for a purpose should make things clearer, and better support components other that the substitute script in using this code. This is just moving the code around, no code should have been significantly changed. * guix/scripts/substitute.scm (): Move record type to (guix narinfo). (fields->alist, narinfo-hash-algorithm+value, narinfo-hash->sha256, narinfo-signature->canonical-sexp, narinfo-maker, read-narinfo, narinfo-sha256, valid-narinfo?, write-narinfo, narinfo->string, string->narinfo, equivalent-narinfo?, supported-compression?, compresses-better?, narinfo-best-uri): Move procedures to (guix narinfo). (%compression-methods): Move variable to (guix narinfo). * guix/narinfo.scm: New file. * Makefile.am (MODULES): Add it. * po/guix/POTFILES.in: Add 'guix/narinfo.scm'. --- tests/challenge.scm | 2 +- tests/substitute.scm | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/challenge.scm b/tests/challenge.scm index 9c6d6e0d58..fdd5fd238e 100644 --- a/tests/challenge.scm +++ b/tests/challenge.scm @@ -27,8 +27,8 @@ #:use-module (guix packages) #:use-module (guix gexp) #:use-module (guix base32) + #:use-module (guix narinfo) #:use-module (guix scripts challenge) - #:use-module (guix scripts substitute) #:use-module ((guix build utils) #:select (find-files)) #:use-module (gnu packages bootstrap) #:use-module (srfi srfi-1) diff --git a/tests/substitute.scm b/tests/substitute.scm index 542aaf603f..697abc4684 100644 --- a/tests/substitute.scm +++ b/tests/substitute.scm @@ -19,6 +19,7 @@ (define-module (test-substitute) #:use-module (guix scripts substitute) + #:use-module (guix narinfo) #:use-module (guix base64) #:use-module (gcrypt hash) #:use-module (guix serialization) -- cgit 1.4.1