On Thu, Sep 05, 2013 at 03:00:27PM +0200, Ludovic Courtès wrote: > BTW, I haven’t check whether this is the case already, but we need > something like > (define (package-with-explicit-python p python) > ;; Return a version of P built for PYTHON. > (package (inherit p) ...)) > so we can just write: > (define python2-pytz > (package-with-explicit-python python-pytz python-2)) The attached patch does almost this, following our offline discussion on how to create packages recursively on the fly: - It adds an argument pair "#:python ,python-2", or replaces an already present argument "#:python something-else", and this recursively for all inputs and native-inputs that use the python build system. - It rewrites the corresponding names from "python-..." to "python2-...", or adds a prefix "python2-". So one can write (define python2-pytz (package-with-explicit-python python-pytz)) As the second argument would always be python-2, I decided to drop it. When trying this with python2-babel, the previous code in python.scm (commented out in the attached patch) and the new one create almost the same derivations, that differ only in /nix/store/4rrnwqsj8c086zzviyypr4fikb7pz49v-python2-babel-0.9.6-guile-builder vs. /nix/store/5prbhg600qa9k8p0bgjs12p4dm682gn8-python2-babel-0.9.6-guile-builder so that the final hash is also different. Comments are welcome. Andreas