[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
73/84: gnu: make-rust-sysroot: Memoize make-rust-sysroot results.
From: |
guix-commits |
Subject: |
73/84: gnu: make-rust-sysroot: Memoize make-rust-sysroot results. |
Date: |
Mon, 8 Jan 2024 12:54:18 -0500 (EST) |
efraim pushed a commit to branch rust-team
in repository guix.
commit 99d5b77769e7beeb91d21190b76605a573a69d10
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Fri Jan 5 16:40:49 2024 +0000
gnu: make-rust-sysroot: Memoize make-rust-sysroot results.
To ensure that it just returns a single package record for some given
arguments, as this helps to avoid poor performance of the store connection
object cache.
* gnu/packages/rust.scm (make-rust-sysroot): Move code to
make-rust-sysroot/implementation.
(make-rust-sysroot/implementation): New variable.
Change-Id: Ibb30c7398328c87c032bb8828635a34ada935167
---
gnu/packages/rust.scm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 452d8cbaa3..13eff46f37 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -59,6 +59,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (guix download)
+ #:use-module (guix memoization)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
@@ -1077,7 +1078,10 @@ exec -a \"$0\" \"~a\" \"$@\""
(package-native-inputs base-rust))))))
(define*-public (make-rust-sysroot target)
- (let ((base-rust rust))
+ (make-rust-sysroot/implementation target rust))
+
+(define make-rust-sysroot/implementation
+ (mlambda (target base-rust)
(package
(inherit base-rust)
(name (string-append "rust-sysroot-for-" target))
- 64/84: gnu: rust-wayland-protocols-0.28: Update to 0.28.6., (continued)
- 64/84: gnu: rust-wayland-protocols-0.28: Update to 0.28.6., guix-commits, 2024/01/08
- 67/84: gnu: rust-wayland-server-0.29: Remove unnecessary inputs., guix-commits, 2024/01/08
- 70/84: gnu: rust-wayland-sys-0.28: Update to 0.28.6., guix-commits, 2024/01/08
- 76/84: gnu: rust-smol-str-0.1: Update to 0.1.24., guix-commits, 2024/01/08
- 78/84: gnu: Add rust-palette-0.6., guix-commits, 2024/01/08
- 51/84: gnu: rust-ciborium-io-0.2: Update to 0.2.1., guix-commits, 2024/01/08
- 60/84: gnu: rust-wayland-cursor-0.28: Update to 0.28.6., guix-commits, 2024/01/08
- 66/84: gnu: rust-wayland-scanner-0.28: Update to 0.28.6., guix-commits, 2024/01/08
- 68/84: gnu: rust-wayland-server-0.28: Update to 0.28.6., guix-commits, 2024/01/08
- 72/84: gnu: rust-winit-0.24: Remove unnecessary inputs., guix-commits, 2024/01/08
- 73/84: gnu: make-rust-sysroot: Memoize make-rust-sysroot results.,
guix-commits <=
- 75/84: gnu: Add rust-sysinfo-0.28., guix-commits, 2024/01/08
- 81/84: gnu: Add rust-bat-0.22., guix-commits, 2024/01/08
- 82/84: gnu: rust-bat-0.18: Refactor package as library., guix-commits, 2024/01/08
- 80/84: gnu: Add rust-bytelines-2., guix-commits, 2024/01/08
- 83/84: gnu: Add rust-box-drawing-0.1., guix-commits, 2024/01/08
- 69/84: gnu: rust-wayland-sys-0.29: Remove unnecessary inputs., guix-commits, 2024/01/08
- 71/84: gnu: rust-winit-0.26: Remove unnecessary inputs., guix-commits, 2024/01/08
- 84/84: gnu: Add git-delta., guix-commits, 2024/01/08
- 77/84: gnu: Add rust-palette-derive-0.6., guix-commits, 2024/01/08
- 79/84: gnu: rust-chrono-humanize-0.2: Update to 0.2.3., guix-commits, 2024/01/08