summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages.scm31
-rw-r--r--gnu/packages/bootstrap.scm35
2 files changed, 32 insertions, 34 deletions
diff --git a/gnu/packages.scm b/gnu/packages.scm
index ec2473422f..0aa289d56c 100644
--- a/gnu/packages.scm
+++ b/gnu/packages.scm
@@ -235,28 +235,27 @@ decreasing version order."
matching)))))
(define find-newest-available-packages
- (memoize
- (lambda ()
- "Return a vhash keyed by package names, and with
+ (mlambda ()
+ "Return a vhash keyed by package names, and with
associated values of the form
(newest-version newest-package ...)
where the preferred package is listed first."
- ;; FIXME: Currently, the preferred package is whichever one
- ;; was found last by 'fold-packages'. Find a better solution.
- (fold-packages (lambda (p r)
- (let ((name (package-name p))
- (version (package-version p)))
- (match (vhash-assoc name r)
- ((_ newest-so-far . pkgs)
- (case (version-compare version newest-so-far)
- ((>) (vhash-cons name `(,version ,p) r))
- ((=) (vhash-cons name `(,version ,p ,@pkgs) r))
- ((<) r)))
- (#f (vhash-cons name `(,version ,p) r)))))
- vlist-null))))
+ ;; FIXME: Currently, the preferred package is whichever one
+ ;; was found last by 'fold-packages'. Find a better solution.
+ (fold-packages (lambda (p r)
+ (let ((name (package-name p))
+ (version (package-version p)))
+ (match (vhash-assoc name r)
+ ((_ newest-so-far . pkgs)
+ (case (version-compare version newest-so-far)
+ ((>) (vhash-cons name `(,version ,p) r))
+ ((=) (vhash-cons name `(,version ,p ,@pkgs) r))
+ ((<) r)))
+ (#f (vhash-cons name `(,version ,p) r)))))
+ vlist-null)))
(define (find-best-packages-by-name name version)
"If version is #f, return the list of packages named NAME with the highest
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 7cde51fff8..c8d94c8303 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -131,30 +131,29 @@ successful, or false to signal an error."
(license gpl3+)))
(define package-with-bootstrap-guile
- (memoize
- (lambda (p)
+ (mlambda (p)
"Return a variant of P such that all its origins are fetched with
%BOOTSTRAP-GUILE."
(define rewritten-input
(match-lambda
- ((name (? origin? o))
- `(,name ,(bootstrap-origin o)))
- ((name (? package? p) sub-drvs ...)
- `(,name ,(package-with-bootstrap-guile p) ,@sub-drvs))
- (x x)))
+ ((name (? origin? o))
+ `(,name ,(bootstrap-origin o)))
+ ((name (? package? p) sub-drvs ...)
+ `(,name ,(package-with-bootstrap-guile p) ,@sub-drvs))
+ (x x)))
(package (inherit p)
- (source (match (package-source p)
- ((? origin? o) (bootstrap-origin o))
- (s s)))
- (inputs (map rewritten-input
- (package-inputs p)))
- (native-inputs (map rewritten-input
- (package-native-inputs p)))
- (propagated-inputs (map rewritten-input
- (package-propagated-inputs p)))
- (replacement (and=> (package-replacement p)
- package-with-bootstrap-guile))))))
+ (source (match (package-source p)
+ ((? origin? o) (bootstrap-origin o))
+ (s s)))
+ (inputs (map rewritten-input
+ (package-inputs p)))
+ (native-inputs (map rewritten-input
+ (package-native-inputs p)))
+ (propagated-inputs (map rewritten-input
+ (package-propagated-inputs p)))
+ (replacement (and=> (package-replacement p)
+ package-with-bootstrap-guile)))))
(define* (glibc-dynamic-linker
#:optional (system (or (and=> (%current-target-system)