You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run my code packaged using mkPoetryApplication, I get the following error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/nix/store/vagb0sjv83ybi435i6iiv10hjrdghph9-python3-3.10.12/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/home/yves/scripts/musnify-mpd/musnify_mpd/__main__.py", line 7, in <module>
import gi
File "/home/yves/.cache/pypoetry/virtualenvs/musnify-mpd-Ql-lE92A-py3.10/lib/python3.10/site-packages/gi/__init__.py", line 40, in <module>
from . import _gi
ImportError: /nix/store/0xxjx37fcy2nl3yz6igmv4mag2a7giq6-glibc-2.33-123/lib/libpthread.so.0: undefined symbol: __libc_siglongjmp, version GLIBC_PRIVATE
Additional context
I use i3 on NixOS. I am trying to write a little script that sends notifications when the song played by MusicPlayerDeamon (MPD) changes. I use a modified version of musnify-mpd.
The problem has to do with using the Python package PyGObject which requires the GI_TYPELIB_PATH environment variable to be set in order for the package to find bindings with GTK-related libraries (I need this to send notifications).
If I activate my developer environment and run nix run '.#default', the script executes fine. If I run nix run '/path/to/flake#default' outside of the flake devshell or if I try poetry run musnify-mpd from the devshell, the code crashes with the error above.
I think that I am doing something wrong when setting up the poetry2nix derivations (for the application and the development environment) and the package nixpkgs.gobject-introspection which sets the environment variable, yet I have not been able to find a solution to my problem as of yet.
Describe the issue
My Python script uses PyGObject:
When I run my code packaged using
mkPoetryApplication
, I get the following error:Additional context
I use i3 on NixOS. I am trying to write a little script that sends notifications when the song played by MusicPlayerDeamon (MPD) changes. I use a modified version of musnify-mpd.
The problem has to do with using the Python package PyGObject which requires the GI_TYPELIB_PATH environment variable to be set in order for the package to find bindings with GTK-related libraries (I need this to send notifications).
If I activate my developer environment and run
nix run '.#default'
, the script executes fine. If I runnix run '/path/to/flake#default'
outside of the flake devshell or if I trypoetry run musnify-mpd
from the devshell, the code crashes with the error above.I think that I am doing something wrong when setting up the poetry2nix derivations (for the application and the development environment) and the package
nixpkgs.gobject-introspection
which sets the environment variable, yet I have not been able to find a solution to my problem as of yet.flake.nix
:pyproject.toml
:poetry.lock
:musnify_mpd/__main__.py
What should I change to my flake or to my poetry configuration to make my script work?
The text was updated successfully, but these errors were encountered: