[Nix-dev] Trouble with pygobject

Richard Wallace rwallace at thewallacepack.net
Fri Oct 31 22:45:37 CET 2014


On Fri, Oct 31, 2014 at 12:05 PM, Bjørn Forsman <bjorn.forsman at gmail.com>
wrote:

> Hi Richard,
>
> On 31 October 2014 19:28, Richard Wallace <rwallace at thewallacepack.net>
> wrote:
> > Hey all,
> [...]
> > Now I'm trying to get pithos (a Pandora GTK client) built [1].  Pithos
> > builds and everything looks ok, but when I try and run it I get
> > `ImportError: No module named gi`.  I'm not familiar with Python
> > development, but a bit of Googling indicates that python can't pygobject.
> >
> > Looking at the wrapper created, I see the path to
> >
> `/nix/store/hlyp3a9cy5k7qhfc1chd1v3bm2jljazn-pygobject-2.28.6/lib/python2.7/site-packages`
> > included in the PYTHONPATH.
>
> I think you need to add gobjectIntrospection to buildInputs, and then
> wrap the executable with GI_TYPELIB_PATH set to GI_TYPELIB_PATH from
> the build environment. See the virt-manager expression for example.
>

Thanks for the suggestion.  It seems to make sense, so I modified the
package as you suggested [1]. Unfortunately I'm still getting the same
error.

The `pithos` script includes the line

  export
GI_TYPELIB_PATH=/nix/store/9imvrzskcak2998zj1242jxgl4p9m5dp-gst-plugins-base-1.4.1/lib/girepository-1.0:/nix/store/byi4j636s13m8w28nvqiakn6nzakmadr-gstreamer-1.4.1/lib/girepository-1.0:/nix/store/y06kp3fxw3r5r3nfkqzc8l3y7r3kvns0-libnotify-0.7.6/lib/girepository-1.0:/nix/store/4z6rr314xg1iszkn2wjvvl16yfmwgwa7-gobject-introspection-1.40.0/lib/girepository-1.0${GI_TYPELIB_PATH:+:}$GI_TYPELIB_PATH

so it looks like it is doing what it is supposed to.

Rich

[1] http://pastebin.com/amAc8wpG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20141031/6abf5ade/attachment.html 


More information about the nix-dev mailing list