Currently, there is some code duplication. I'll try to rewrite it without modifying resulting derivations. svn path=/nixpkgs/trunk/; revision=9670