[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
23/87: substitute: Parse '_NIX_OPTIONS' once.
From: |
guix-commits |
Subject: |
23/87: substitute: Parse '_NIX_OPTIONS' once. |
Date: |
Mon, 9 Jan 2023 18:27:30 -0500 (EST) |
mbakke pushed a commit to branch staging
in repository guix.
commit 007e69756087234de4d9ea896e013e5d0232bd25
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Jan 9 10:27:54 2023 +0100
substitute: Parse '_NIX_OPTIONS' once.
* guix/scripts/substitute.scm (find-daemon-option): Arrange to call
'daemon-options' only once.
---
guix/scripts/substitute.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 0efa61b0d7..fedb33019d 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013-2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2018 Kyle Meyer <kyle@kyleam.com>
;;; Copyright © 2020 Christopher Baines <mail@cbaines.net>
@@ -706,10 +706,12 @@ substitutes may be unavailable\n")))))
(string-drop option=value (+ 1 equal-sign))))))
(string-tokenize newline-separated %not-newline)))))
-(define (find-daemon-option option)
- "Return the value of build daemon option OPTION, or #f if it could not be
+(define find-daemon-option
+ (let ((options (delay (daemon-options))))
+ (lambda (option)
+ "Return the value of build daemon option OPTION, or #f if it could not be
found."
- (assoc-ref (daemon-options) option))
+ (assoc-ref (force options) option))))
(define %default-substitute-urls
(match (and=> (or (find-daemon-option "untrusted-substitute-urls") ;client
- 20/87: gnu: Add r-gg3d., (continued)
- 20/87: gnu: Add r-gg3d., guix-commits, 2023/01/09
- 27/87: gnu: Add minetest-wielded-light., guix-commits, 2023/01/09
- 04/87: gnu: java-jgit-4.2: Remove trailing #T from build phase., guix-commits, 2023/01/09
- 05/87: gnu: java-cisd-args4j: Remove trailing #T from build phase., guix-commits, 2023/01/09
- 08/87: gnu: Remove java-ecj-3.5., guix-commits, 2023/01/09
- 10/87: gnu: java-cisd-jhdf5: Remove trailing #T., guix-commits, 2023/01/09
- 11/87: gnu: java-cisd-jhdf5: Do not override default JDK., guix-commits, 2023/01/09
- 14/87: gnu: Remove java-ecj-3., guix-commits, 2023/01/09
- 15/87: gnu: python-afdko: Fix failing tests., guix-commits, 2023/01/09
- 21/87: services: base: Add environment support to guix-configuration., guix-commits, 2023/01/09
- 23/87: substitute: Parse '_NIX_OPTIONS' once.,
guix-commits <=
- 24/87: derivations: 'read-derivation' correctly handles case with empty hash., guix-commits, 2023/01/09
- 25/87: daemon: Improve error message for wrong hash sizes., guix-commits, 2023/01/09
- 26/87: read-print: Do not use extended notation when printing '1+', '1-', etc., guix-commits, 2023/01/09
- 28/87: gnu: Add minetest-mobs-monster., guix-commits, 2023/01/09
- 34/87: gnu: r-rstpm2: Update to 1.5.9., guix-commits, 2023/01/09
- 36/87: gnu: r-timedate: Update to 4022.108., guix-commits, 2023/01/09
- 37/87: gnu: r-mitml: Update to 0.4-4., guix-commits, 2023/01/09
- 31/87: gnu: Add r-httr2., guix-commits, 2023/01/09
- 47/87: gnu: r-precrec: Update to 0.14.1., guix-commits, 2023/01/09
- 22/87: doc: cookbook: Add "Installing Guix on a Cluster" chapter., guix-commits, 2023/01/09