Patch by John Altobelli <acocaracha@gmail.com>, minor edits by Ludovic Courtès <ludo@gnu.org>. svn path=/nixpkgs/trunk/; revision=13823