[Nix-dev] announce: preliminary version of nixpkgs-python-overlay
Marc Weber
marco-oweber at gmx.de
Fri Mar 4 21:16:50 CET 2011
Basic idea:
dump data from pypi package index.
Make Nix read the dump creating derivations on the fly:
Example:
devEnv = pythonEnv26 {
name = "libs-coding-style";
# p = { pylint = ["<" "2.0" ]; } force pylint version being less # than 2.0
names = [ "pylint" "pyflakes" ];
};
In a similar way you could make it create dependencies for other
packages such as gimp or inkscape ..
If you install this you'll get a script which you can use this way:
bin/python-env-libs-coding-style bash
then NIX_PYTHON_SITES is defined and the package are put in $PATH
so that you can run pyflake and pylint from commandline.
Package dependencies is taken care of if the constraints are correct.
The solver will fail if two packages choose different versions of the
same package. Then you can choose either version by using a constraint
as shown above.
I haven't done too much testing yet and there are still some problems to
solve such as find out which python package works with what python
version.
Ping back if you're interested in testing packages etc.
Desigs is very similar to the python-ruby-overlay I announced earlier
doing the same for rubyforge.
repos:
http://gitorious.org/nixpkgs-python-overlay
-> nixpkgs-python-overlay-dump (script dumping pypi)
-> nixpgks-python-overlay-packages (a dump I made for you which will be updated by cron job once a week soon)
-> nixpgks-pyhton-overlay (the nix code doing all the stuff)
The code is based on the arbitrary-strings-as-names patch and maybe some
more things I put into my nix/nixos repositories (branches nix2/marc and
nix2/nix-python-sites)
So it won't work with current trunk.
The purpose of the dump is to abstract away the tedious task of getting
source tarballs and creating derivations. So only the manual nixpkgs
specific adjustments have to take place. (hopefully).
Marc Weber
More information about the nix-dev
mailing list