Factorize package search between 'guix package' and 'guix build'.
authorLudovic Courtès <ludo@gnu.org>
Sat, 21 Dec 2013 21:36:32 +0000 (22:36 +0100)
committerLudovic Courtès <ludo@gnu.org>
Sat, 21 Dec 2013 21:36:32 +0000 (22:36 +0100)
commit3f26bfc18a70a65443688d7724e5f97c53855c01
tree71c1928fbced3aeb99c2b5a1b9bb2f0a62bdf30b
parent0820098d1ccf63e3e8b44df67dcb4236b78975c6
Factorize package search between 'guix package' and 'guix build'.

* guix/scripts/package.scm (newest-available-packages): Remove.
  (find-best-packages-by-name): Move to...
* gnu/packages.scm (find-best-packages-by-name): ... here.
  (find-newest-available-packages): Memoize.
* guix/scripts/build.scm (specification->package): New procedure,
  formerly called 'find-package' within 'guix-build'.
  (guix-build): Adjust accordingly.
gnu/packages.scm
guix/scripts/build.scm
guix/scripts/package.scm