summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--doc/guix.texi9
-rw-r--r--gnu/packages/python.scm39
-rw-r--r--gnu/system.scm2
-rw-r--r--guix/scripts/publish.scm58
4 files changed, 100 insertions, 8 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 30927be01f..822aefa3a8 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4432,7 +4432,7 @@ System Distribution, or GuixSD.
 The distribution provides core GNU packages such as GNU libc, GCC, and
 Binutils, as well as many GNU and non-GNU applications.  The complete
 list of available packages can be browsed
-@url{http://www.gnu.org/software/guix/package-list.html,on-line} or by
+@url{http://www.gnu.org/software/guix/packages,on-line} or by
 running @command{guix package} (@pxref{Invoking guix package}):
 
 @example
@@ -4524,8 +4524,9 @@ requires familiarity with GNU/Linux (see the following subsections to
 get a feel of what that means.)
 
 @item
-The system does not yet provide GNOME and KDE; it provides Xfce, though,
-if graphical desktop environments are your thing.
+The system does not yet provide full GNOME and KDE desktops.  Xfce and
+Enlightenment are available though, if graphical desktop environments
+are your thing, as well as a number of X11 window managers.
 
 @item
 Support for the Logical Volume Manager (LVM) is missing.
@@ -4535,7 +4536,7 @@ Few system services are currently supported out-of-the-box
 (@pxref{Services}).
 
 @item
-On the order of 1,900 packages are available, which means that you may
+More than 2,000 packages are available, but you may
 occasionally find that a useful package is missing.
 @end itemize
 
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 0c4b649ec2..4fd5eef892 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2083,6 +2084,44 @@ sources.")
 (define-public python2-sphinx-rtd-theme
   (package-with-python2 python-sphinx-rtd-theme))
 
+(define-public python-feedgenerator
+  (package
+    (name "python-feedgenerator")
+    (version "20150710.97185b7")
+    (source
+     ;; Using the git checkout for now because license file not added till
+     ;; https://github.com/dmdm/feedgenerator-py3k/commit/97185b7566c240c4bf5ed80db7d6c271204dab39
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/dmdm/feedgenerator-py3k.git")
+             (commit "97185b7566c240c4bf5ed80db7d6c271204dab39")))
+       (sha256
+        (base32
+         "0dbd6apij5j1923ib905x0srgcyls4wlabqlwp4dzkwmksvnrr2a"))))
+    (arguments
+     `(;; With standard flags, the install phase attempts to create a zip'd
+       ;; egg file, and fails with an error: 'ZIP does not support timestamps
+       ;; before 1980'
+       #:configure-flags '("--single-version-externally-managed"
+                           "--record=feedgenerator.txt")))
+    (build-system python-build-system)
+    (inputs
+     `(("python-setuptools" ,python-setuptools)
+       ("python-pytz" ,python-pytz)
+       ("python-six" ,python-six)))
+    (home-page
+     "https://github.com/dmdm/feedgenerator-py3k.git")
+    (synopsis
+     "Standalone version of Django's Atom/RSS feed generator")
+    (description
+     "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
+which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
+    (license bsd-3)))
+
+(define-public python2-feedgenerator
+  (package-with-python2 python-feedgenerator))
+
 (define-public python-scikit-learn
   (package
     (name "python-scikit-learn")
diff --git a/gnu/system.scm b/gnu/system.scm
index cf9ee123c7..e3fddcf1f6 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -103,7 +103,7 @@
   make-operating-system
   operating-system?
   (kernel operating-system-kernel                 ; package
-          (default linux-libre))
+          (default linux-libre-4.0))
   (kernel-arguments operating-system-kernel-arguments
                     (default '()))                ; list of gexps/strings
   (bootloader operating-system-bootloader)        ; <grub-configuration>
diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm
index e0226f35ee..8906059f7b 100644
--- a/guix/scripts/publish.scm
+++ b/guix/scripts/publish.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 David Thompson <davet@gnu.org>
+;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -26,6 +27,7 @@
   #:use-module (rnrs bytevectors)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-2)
+  #:use-module (srfi srfi-9 gnu)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-37)
   #:use-module (web http)
@@ -206,8 +208,10 @@ References: ~a~%"
     (if (file-exists? store-path)
         (values '((content-type . (application/x-nix-archive
                                    (charset . "ISO-8859-1"))))
-                (lambda (port)
-                  (write-file store-path port)))
+                ;; XXX: We're not returning the actual contents, deferring
+                ;; instead to 'http-write'.  This is a hack to work around
+                ;; <http://bugs.gnu.org/21093>.
+                store-path)
         (not-found request))))
 
 (define extract-narinfo-hash
@@ -227,6 +231,54 @@ is invalid."
 example: \"/foo/bar\" yields '(\"foo\" \"bar\")."
   (split-and-decode-uri-path (uri-path (request-uri request))))
 
+
+;;;
+;;; Server.
+;;;
+
+(define %http-write
+  (@@ (web server http) http-write))
+
+(define (sans-content-length response)
+  "Return RESPONSE without its 'content-length' header."
+  (set-field response (response-headers)
+             (alist-delete 'content-length
+                           (response-headers response)
+                           eq?)))
+
+(define (http-write server client response body)
+  "Write RESPONSE and BODY to CLIENT, possibly in a separate thread to avoid
+blocking."
+  (match (response-content-type response)
+    (('application/x-nix-archive . _)
+     ;; Sending the the whole archive can take time so do it in a separate
+     ;; thread so that the main thread can keep working in the meantime.
+     (call-with-new-thread
+      (lambda ()
+        (let* ((response (write-response (sans-content-length response)
+                                         client))
+               (port     (response-port response)))
+          ;; XXX: Given our ugly workaround for <http://bugs.gnu.org/21093> in
+          ;; 'render-nar', BODY here is just the file name of the store item.
+          ;; We call 'write-file' from here because we know that's the only
+          ;; way to avoid building the whole nar in memory, which could
+          ;; quickly become a real problem.  As a bonus, we even do
+          ;; sendfile(2) directly from the store files to the socket.
+          (write-file (utf8->string body) port)
+          (close-port port)
+          (values)))))
+    (_
+     ;; Handle other responses sequentially.
+     (%http-write server client response body))))
+
+(define-server-impl concurrent-http-server
+  ;; A variant of Guile's built-in HTTP server that offloads possibly long
+  ;; responses to a different thread.
+  (@@ (web server http) http-open)
+  (@@ (web server http) http-read)
+  http-write
+  (@@ (web server http) http-close))
+
 (define (make-request-handler store)
   (lambda (request body)
     (format #t "~a ~a~%"
@@ -248,7 +300,7 @@ example: \"/foo/bar\" yields '(\"foo\" \"bar\")."
 
 (define (run-publish-server socket store)
   (run-server (make-request-handler store)
-              'http
+              concurrent-http-server
               `(#:socket ,socket)))
 
 (define (open-server-socket address)