summaryrefslogtreecommitdiff
path: root/website/www/packages.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-08-19 15:40:42 +0200
committerLudovic Courtès <ludo@gnu.org>2015-08-19 15:40:42 +0200
commit89258f8f908b76078d9e0fe6183db9b8e8539044 (patch)
treee80c969a244b43ad743271f9ad5469dc1f57082e /website/www/packages.scm
parent76beeac2210b22336ddf6c5a2424a1b041ce2544 (diff)
downloadguix-artwork-89258f8f908b76078d9e0fe6183db9b8e8539044.tar
guix-artwork-89258f8f908b76078d9e0fe6183db9b8e8539044.tar.gz
website: packages: Display the actual number of packages.
* website/www/packages.scm (number*): New procedure. (packages-page): Use it instead of hard-coded package number.
Diffstat (limited to 'website/www/packages.scm')
-rw-r--r--website/www/packages.scm12
1 files changed, 11 insertions, 1 deletions
diff --git a/website/www/packages.scm b/website/www/packages.scm
index 7090b30..09da932 100644
--- a/website/www/packages.scm
+++ b/website/www/packages.scm
@@ -34,6 +34,7 @@
#:use-module (sxml fold)
#:use-module (web uri)
#:use-module (ice-9 match)
+ #:use-module (ice-9 i18n)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-19)
#:export (packages-page))
@@ -248,6 +249,13 @@ description-ids as formal parameters."
(id "top"))
"^")))
+(define (number* number)
+ "Return NUMBER correctly formatting according to English conventions."
+ (number->locale-string number 0
+ (or (false-if-exception
+ (make-locale LC_ALL "en_US.utf8"))
+ (make-locale LC_ALL "en_US.UTF-8"))))
+
(define (packages-page)
`(html (@ (lang "en"))
@@ -259,7 +267,9 @@ description-ids as formal parameters."
(div (@ (id "content-box"))
(article
(h1 "Packages")
- (p "GNU Guix provides 1,500+ packages transparently "
+ (p "GNU Guix provides "
+ ,(number* (fold-packages (lambda (p n) (+ 1 n)) 0))
+ " packages transparently "
(a (@ (href "http://hydra.gnu.org/jobset/gnu/master#tabs-status"))
"available as pre-built binaries")
". This is a complete lists of the packages. Our "