[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guix-package --search
From: |
Nikita Karetnikov |
Subject: |
Re: guix-package --search |
Date: |
Sun, 20 Jan 2013 16:40:38 -0500 |
Hi,
I'm attaching the diff.
Some comments:
1. 'psd-list' is a potential bottleneck. It will cause problems when we
have more packages. If it's possible to evaluate it lazily, I'll
rewrite it. (I haven't checked yet.)
2. The above is valid for 'package?' too. Also, it's probably possible
to rewrite it using 'match', but I haven't found a way to do so.
3. The command-line part just mimics 'list-available'. (Maybe there is
a better way.)
4. I've noticed that 'fold-packages' returns duplicates. Should it be
fixed? Should I filter the output instead?
Examples:
# ./pre-inst-env guile
scheme@(guile-user)> ,use (guix ui) (gnu packages) (guix packages)
scheme@(guile-user)> (for-each display
(sort
(map (lambda (x)
(string-append (package-name
x) " "
(location->string
(package-location x))
"\n"))
(fold-packages cons
'()))
string<?))
[...]
glibc gnu/packages/base.scm:497:3
glibc gnu/packages/base.scm:497:3
[...]
guile gnu/packages/guile.scm:93:3
guile gnu/packages/guile.scm:93:3
# ./pre-inst-env guix-package -s "C library"
[...]
glibc 2.17 gnu/packages/base.scm:497:3
glibc 2.17 gnu/packages/base.scm:497:3
# ./pre-inst-env guix-package -s Guile
[...]
guile 2.0.7 gnu/packages/guile.scm:93:3
guile 2.0.7 gnu/packages/guile.scm:93:3
Nikita
guix-package-search.diff
Description: Text Data
pgpxDaggMbNt0.pgp
Description: PGP signature