Patch by Corey O'Connor, see http://reviewboard.loegria.net/r/15/ svn path=/nixpkgs/trunk/; revision=33461