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
If I understand the derivation correctly, there's a patch applied to lgi that forces typelib loading of the cairo library through ffi first; this is done so that dlopen (triggered by g_module_open) is executed only when the library is already pre-loaded through gobject-introspection.
But evidently this is not happening on Darwin, and the library is loaded with dlopen (which fails).
Steps to reproduce
On Darwin:
$ nix-shell -p lua53Packages.lgi gobject-introspection --command 'lua -e "local lgi = require \"lgi\".cairo"'
lua: ...-lua5.3-lgi-0.9.2-1/share/lua/5.3/lgi/override/cairo.lua:59: attempt to index a nil value (field '_module')
stack traceback:
...-lua5.3-lgi-0.9.2-1/share/lua/5.3/lgi/override/cairo.lua:59: in main chunk
[C]: in function 'require'
...466v3-lua5.3-lgi-0.9.2-1/share/lua/5.3/lgi/namespace.lua:183: in function 'lgi.namespace.require'
(...tail calls...)
(command line):1: in main chunk
[C]: in ?
$
Nixpkgs version
Please select a version.
Describe the bug
This is happening on Darwin only. Linux is fine.
If I understand the derivation correctly, there's a patch applied to
lgi
that forcestypelib
loading of thecairo
library throughffi
first; this is done so thatdlopen
(triggered byg_module_open
) is executed only when the library is already pre-loaded throughgobject-introspection
.But evidently this is not happening on Darwin, and the library is loaded with
dlopen
(which fails).Steps to reproduce
On Darwin:
On Linux:
Workaround:
Expected behaviour
require "lgi".cairo
works.Screenshots
No response
Relevant log output
Additional context
No response
System metadata
Are you using nix-darwin?
Yes, I am using nix-darwin.
Notify maintainers
Note for maintainers: Please tag this issue in your pull request description. (i.e.
Resolves #ISSUE
.)I assert that this issue is relevant for Nixpkgs
Is this issue important to you?
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: