Traceback (most recent call last):
File "./result/usr/bin/com.github.mirkobrombin.bottles", line 28, in <module>
import main
File "/nix/store/1jvyxxj2l7szbchc8nsn9a5j3cn1g7xy-bottles-0.2.4/usr/share/com.github.mirkobrombin.bottles/bottles/main.py", line 22, in <module>
import gi
ModuleNotFoundError: No module named 'gi'
Would you have any idea why the propagatedBuildInputs are not kicking in ?
Thank you both for your answers @doronbehar, @jtojnar !
I tried to apply both your comments but with little success : I get the same error while running nix-build -E "with import <nixpkgs> {}; callPackage pkgs/bottles.nix {}" -K --quiet && ./result/usr/bin/com.github.mirkobrombin.bottles
Ouput of the command
Traceback (most recent call last):
File "./result/usr/bin/com.github.mirkobrombin.bottles", line 28, in <module>
import main
File "/nix/store/mywi04zn7plsv2nj6zjcg3bi9z543lc0-bottles-0.2.4/usr/share/com.github.mirkobrombin.bottles/bottles/main.py", line 22, in <module>
import gi
ModuleNotFoundError: No module named 'gi'
I tried both postInstall and preFixup without any effect.
Here is the file I used modified with your comments :
Good catch @FRidh Interestingly it builds now but it pushed back the problem to runtime ones: running the program now yields
command com.github.mirkobrombin.bottles output
** (.com.github.mirkobrombin.bottles-wrapped:13817): WARNING **: 15:57:16.209: Failed to load shared library '/build/source/build/lib/libgranite.so.5.2.3' referenced by the typelib: /build/source/build/lib/libgranite.so.5.2.3: cannot open shared object file: No such file or directory
/nix/store/kkp78b1wxdzi1iizmbxpw7gf3nr1g1c1-bottles-0.2.4/usr/share/com.github.mirkobrombin.bottles/bottles/welcome.py:49: Warning: cannot retrieve class for invalid (unclassed) type 'void'
self.welcome = Granite.WidgetsWelcome()
Traceback (most recent call last):
File "/nix/store/kkp78b1wxdzi1iizmbxpw7gf3nr1g1c1-bottles-0.2.4/usr/share/com.github.mirkobrombin.bottles/bottles/main.py", line 59, in do_activate
self.win = wn.Window()
File "/nix/store/kkp78b1wxdzi1iizmbxpw7gf3nr1g1c1-bottles-0.2.4/usr/share/com.github.mirkobrombin.bottles/bottles/window.py", line 47, in __init__
self.stack = sk.Stack(self)
File "/nix/store/kkp78b1wxdzi1iizmbxpw7gf3nr1g1c1-bottles-0.2.4/usr/share/com.github.mirkobrombin.bottles/bottles/stack.py", line 62, in __init__
self.welcome = wl.Welcome(self)
File "/nix/store/kkp78b1wxdzi1iizmbxpw7gf3nr1g1c1-bottles-0.2.4/usr/share/com.github.mirkobrombin.bottles/bottles/welcome.py", line 49, in __init__
self.welcome = Granite.WidgetsWelcome()
TypeError: could not get a reference to type class
Non-python dependencies like pantheon.granite should go to buildInputs.
But what you are seeing is likely caused by the strictDeps issue I mentioned. Add strictDeps = false.
And also preInstall will not run when installPhase does not contain runHook preInstall (similarly runHook postInstall).
Applying your advice (see below) yields the same runtime output but in different places :
output of the command
** (.com.github.mirkobrombin.bottles-wrapped:20486): WARNING **: 17:20:01.921: Failed to load shared library '/build/source/build/lib/libgranite.so.5.2.3' referenced by the typelib: /build/source/build/lib/libgranite.so.5.2.3: cannot open shared object file: No such file or directory
/nix/store/dmqrq9kzrah4qk9r73si8j6mzd4yjvh4-bottles-0.2.4/usr/share/com.github.mirkobrombin.bottles/bottles/welcome.py:49: Warning: cannot retrieve class for invalid (unclassed) type 'void'
self.welcome = Granite.WidgetsWelcome()
Traceback (most recent call last):
File "/nix/store/dmqrq9kzrah4qk9r73si8j6mzd4yjvh4-bottles-0.2.4/usr/share/com.github.mirkobrombin.bottles/bottles/main.py", line 59, in do_activate
self.win = wn.Window()
File "/nix/store/dmqrq9kzrah4qk9r73si8j6mzd4yjvh4-bottles-0.2.4/usr/share/com.github.mirkobrombin.bottles/bottles/window.py", line 47, in __init__
self.stack = sk.Stack(self)
File "/nix/store/dmqrq9kzrah4qk9r73si8j6mzd4yjvh4-bottles-0.2.4/usr/share/com.github.mirkobrombin.bottles/bottles/stack.py", line 62, in __init__
self.welcome = wl.Welcome(self)
File "/nix/store/dmqrq9kzrah4qk9r73si8j6mzd4yjvh4-bottles-0.2.4/usr/share/com.github.mirkobrombin.bottles/bottles/welcome.py", line 49, in __init__
self.welcome = Granite.WidgetsWelcome()
TypeError: could not get a reference to type class
Aww, that makes me sad to look at
Forgot about that issue, is the solution to patch vala to generate absolute paths to the dependencies the gir specifies?
If the program tries to find wine64 in PATH, you need to add the package that contains wine64 to the PATH (maybe it is in different package than wine, we are adding). If it has a certain path (e.g. /usr/bin/wine64 hardcoded), you will need to patch it.