Revert "packages: 'package-input-rewriting' can take a promise."
This reverts commit 7d2be1277b
, which
turned out to be unhelpful for the problem at hand:
https://lists.gnu.org/archive/html/guix-devel/2019-01/msg00486.html
This commit is contained in:
parent
29e76f0722
commit
c9c51ac39a
|
@ -391,7 +391,7 @@ GNU@tie{}Guile. Use the @code{(ice-9 readline)} module and call its
|
||||||
(define package-for-guile-2.0
|
(define package-for-guile-2.0
|
||||||
;; A procedure that rewrites the dependency tree of the given package to use
|
;; A procedure that rewrites the dependency tree of the given package to use
|
||||||
;; GUILE-2.0 instead of GUILE-2.2.
|
;; GUILE-2.0 instead of GUILE-2.2.
|
||||||
(package-input-rewriting (delay `((,guile-2.2 . ,guile-2.0)))
|
(package-input-rewriting `((,guile-2.2 . ,guile-2.0))
|
||||||
(guile-variant-package-name "guile2.0")))
|
(guile-variant-package-name "guile2.0")))
|
||||||
|
|
||||||
(define-public guile-for-guile-emacs
|
(define-public guile-for-guile-emacs
|
||||||
|
|
|
@ -855,27 +855,19 @@ when CUT? returns true for a given package."
|
||||||
#:optional (rewrite-name identity))
|
#:optional (rewrite-name identity))
|
||||||
"Return a procedure that, when passed a package, replaces its direct and
|
"Return a procedure that, when passed a package, replaces its direct and
|
||||||
indirect dependencies (but not its implicit inputs) according to REPLACEMENTS.
|
indirect dependencies (but not its implicit inputs) according to REPLACEMENTS.
|
||||||
REPLACEMENTS is a list of package pairs or a promise thereof; the first
|
REPLACEMENTS is a list of package pairs; the first element of each pair is the
|
||||||
element of each pair is the package to replace, and the second one is the
|
package to replace, and the second one is the replacement.
|
||||||
replacement.
|
|
||||||
|
|
||||||
Optionally, REWRITE-NAME is a one-argument procedure that takes the name of a
|
Optionally, REWRITE-NAME is a one-argument procedure that takes the name of a
|
||||||
package and returns its new name after rewrite."
|
package and returns its new name after rewrite."
|
||||||
(define (rewrite p)
|
(define (rewrite p)
|
||||||
(match (assq-ref (if (promise? replacements)
|
(match (assq-ref replacements p)
|
||||||
(force replacements)
|
|
||||||
replacements)
|
|
||||||
p)
|
|
||||||
(#f (package
|
(#f (package
|
||||||
(inherit p)
|
(inherit p)
|
||||||
(name (rewrite-name (package-name p)))))
|
(name (rewrite-name (package-name p)))))
|
||||||
(new new)))
|
(new new)))
|
||||||
|
|
||||||
(package-mapping rewrite
|
(package-mapping rewrite (cut assq <> replacements)))
|
||||||
(lambda (package)
|
|
||||||
(assq package (if (promise? replacements)
|
|
||||||
(force replacements)
|
|
||||||
replacements)))))
|
|
||||||
|
|
||||||
(define-syntax-rule (package/inherit p overrides ...)
|
(define-syntax-rule (package/inherit p overrides ...)
|
||||||
"Like (package (inherit P) OVERRIDES ...), except that the same
|
"Like (package (inherit P) OVERRIDES ...), except that the same
|
||||||
|
|
Loading…
Reference in New Issue