summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-01-30 07:26:09 -0500
committerDavid Thompson <dthompson2@worcester.edu>2015-01-30 07:27:13 -0500
commit37e1ab9d96d2f4b51bf50570ae816c513b50d6f3 (patch)
treee876db6336f409b0436fc23bbf28ed7ccf4716bf
parent5e82f76c4305d8170f6b49e6d206084e1e45623a (diff)
package: Add %all-packages.
* guix-web/package.scm (%all-packages): New variable. * guix-web/view.scm (all-packages-json): Use it.
-rw-r--r--guix-web/package.scm6
-rw-r--r--guix-web/view.scm2
2 files changed, 6 insertions, 2 deletions
diff --git a/guix-web/package.scm b/guix-web/package.scm
index def44aa..bf92351 100644
--- a/guix-web/package.scm
+++ b/guix-web/package.scm
@@ -26,9 +26,13 @@
#:use-module (guix utils)
#:use-module (guix ui)
#:use-module (gnu packages)
- #:export (package-install
+ #:export (%all-packages
+ package-install
profile-generations*))
+(define %all-packages
+ (fold-packages cons '()))
+
(define %profile
(string-append "/usr/var/guix/profiles/per-user/"
(getenv "USER") "/guix-profile"))
diff --git a/guix-web/view.scm b/guix-web/view.scm
index 123a1d5..559d275 100644
--- a/guix-web/view.scm
+++ b/guix-web/view.scm
@@ -115,7 +115,7 @@
'()))))
(define (all-packages-json)
- (map package->json (fold-packages cons '())))
+ (map package->json %all-packages))
(define (view-package-json name)
(map (lambda (p) (package->json p #t))