guix package: '--search' matches against package names.
* guix/scripts/package.scm (find-packages-by-description): Return packages whose name matches RX.master
parent
3c1d9799b8
commit
b2ba65c897
|
@ -325,8 +325,8 @@ DURATION-RELATION with the current time."
|
||||||
(else #f)))
|
(else #f)))
|
||||||
|
|
||||||
(define (find-packages-by-description rx)
|
(define (find-packages-by-description rx)
|
||||||
"Search in SYNOPSIS and DESCRIPTION using RX. Return a list of
|
"Return the list of packages whose name, synopsis, or description matches
|
||||||
matching packages."
|
RX."
|
||||||
(define (same-location? p1 p2)
|
(define (same-location? p1 p2)
|
||||||
;; Compare locations of two packages.
|
;; Compare locations of two packages.
|
||||||
(equal? (package-location p1) (package-location p2)))
|
(equal? (package-location p1) (package-location p2)))
|
||||||
|
@ -337,7 +337,8 @@ matching packages."
|
||||||
(define matches?
|
(define matches?
|
||||||
(cut regexp-exec rx <>))
|
(cut regexp-exec rx <>))
|
||||||
|
|
||||||
(if (or (and=> (package-synopsis package)
|
(if (or (matches? (gettext (package-name package)))
|
||||||
|
(and=> (package-synopsis package)
|
||||||
(compose matches? gettext))
|
(compose matches? gettext))
|
||||||
(and=> (package-description package)
|
(and=> (package-description package)
|
||||||
(compose matches? gettext)))
|
(compose matches? gettext)))
|
||||||
|
|
Reference in New Issue