[Nix-dev] hgsubversion (and subvertpy) nix-expressions

Ilya Cassina ilya.cassina at unine.ch
Fri Oct 15 17:21:06 CEST 2010


On Thursday 14 October 2010 16:31:30 you wrote:
> On Thursday 14 October 2010 11:55:34 Lluís Batlle i Rossell wrote:
> > On Thu, Oct 14, 2010 at 10:39:41AM +0200, Ilya Cassina wrote:
> > > On Thursday 14 October 2010 08:53:16 Lluís Batlle i Rossell wrote:
> > > > Look at top-level/python-packages.nix. I think the 
buildPythonPackage
> > > > expresion may do all the work you are doing here.
> > > 
> > > I will and send back the changes (and add metadata this time!).
> > 
> > Add the packages in the python-packages.nix file, if you can. Don't make
> > nix files apart.
> 
> hgsubversion didn't exactly work as a python package, i've put it in
> applications/version-control/mercurial/hgsubversion.nix
> 
> subvertpy was effortless :P

Actually that's untrue:

with buildPythonPackage now subvertpy gets installed to

/nix/store/{hash}-python-subvertpy-0.7.4/lib/python2.6/site-
packages/subvertpy-0.7.4-py2.6-linux-x86_64.egg/subvertpy

and hgsubversion is unable to find it.

I'm sure there is some python/env/nix-profile related trick to make it 
automagically work. 

With subvertpy installed to /nix/store/{hash}-python-
subvertpy-0.7.4/lib/python2.6/site-packages/subvertpy there was no trouble 
(of course, one needs to set PYTHONPATH="~/.nix-profile/lib/pyhthon2.6/site-
packages").

As a temporary workaround one can always add ~/.nix-
profile/lib/python2.6/site-packages/subvertpy-0.7.4-pyVERSION-linux-ARCH.egg 
to the PYTHONPATH and hgsubversion will again find it.

But sure i would like to make this better (note: with non-buildPythonPackage 
nix expression i just copied the built directory to 
$out/lib/python$version/site-packages and no troubles).

With ruby i've found out that installing ruby-rubygems-update and exporting 
some env vars (quite) according to development/interpreters/ruby/lib.nix, 
ruby modules get autoloaded flawlessy, maybe there is such a woodoo magic 
for python too?
 
> here the patch against nixpkgs/trunk r24289, enjoy! (today i'll write a
> nixpkgs/nixos mercurial wiki page (as i've spent all yesterday tracking
> down a nasty bug/mistake that's better to avoid))

The wiki is here: http://wiki.nixos.org/wiki/Mercurial_and_Nix_repositories

sincerly,

imc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20101015/a574f2af/attachment.html 


More information about the nix-dev mailing list