[tahoe-dev] [Nix-dev] Re: Tahoe-LAFS in NixOS
Zooko Wilcox-O'Hearn
zooko at zooko.com
Sun Dec 13 16:26:12 PST 2009
On Sunday, 2009-12-13, at 15:54 , Ludovic Courtès wrote:
>> http://allmydata.org/pipermail/tahoe-dev/2009-December/003279.html
>
> At first sight it seems like a bit of overhead I’d like to avoid
> these days.
Ah, too bad. It really isn't that much work, but it kind of "looks"
like a lot of work when you look at the instructions.
> Indeed, that seems to be an interesting approach. However, is it
> 100% automatic or 90%ish? If the latter (which I suspect from my
> experience packaging several Python libs), I wonder whether it’s a
> big win in terms of the time spent packaging a given piece of
> software. What do you think?
The declarations of dependencies within the Python code [1] are 100%
accurate -- they list all the Python packages (which Python calls
"distributions" instead of "packages") that Tahoe-LAFS needs. The
question is how to map from Python "distributions" to NixOS
packages. For example, given that Tahoe-LAFS requires a Python
"distribution" named "Twisted >= 2.4.0", how does this hypothetical
automated tool determine that the Nixpkg named
"pythonPackages.Twisted 8.2.0" will satisfy?
I suspect that a heuristic like prepending "pythonPackages." to the
distribution name would be one of those 90% solutions, because
occasionally a Python distribution will have a name different from
the name of the operating system package that houses it. Unless I'm
wrong and NixOS has a strong policy about making them always match.
It is certainly not a 100% solution for Debian/Ubuntu, so the way we
did this in stdeb [3] was to use a database which has all of the
paths and filenames of all of the packages (the "apt-file" database),
and look for a file named "Twisted-8.2.0.egg-info". A well-packaged
Python distribution should have such a file if and only if it
provides the "Twisted" distribution, v8.2.0. For the uses that I
have put it to, this hack works 100%.
Regards,
Zooko
[1] http://allmydata.org/trac/tahoe/browser/_auto_deps.py
[2] https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/top-level/
python-packages.nix
[3] http://github.com/astraw/stdeb
More information about the tahoe-dev
mailing list