Open tobiasBora opened 2 years ago
nixGL
Thanks, I thought nixGL was not useful for users running NixOs. I tried to do that, but for some reasons it does not work:
$ nix-channel --add https://github.com/guibou/nixGL/archive/main.tar.gz nixgl && nix-channel --update nixgl
$ nix-shell -p '(import <nixgl> {}).auto.nixGLDefault'
$ nixGL nix run blender-bin#blender_3_1
Read prefs: /home/leo/.config/blender/3.1/config/userpref.blend
intern/ghost/intern/GHOST_WindowX11.cpp:206: X11 glXChooseVisual() failed, verify working openGL system!
initial window could not find the GLX extension
Writing: /run/user/1000/blender.crash.txt
/nix/store/garwhsd29qn28i056n2sak26sflmf8mg-nixGL/bin/nixGL: line 5: 2320413 Segmentation fault (core dumped) "$@"
I guess I've done something stupid, maybe nixGL does not work with nix run directly, or I need to do something special to ensure versions matches? I tried to read the documentation but it's not obvious to me.
Ok, so the solution was to read the value of nixpkgs inside the blender expression and ask nixGL to use it:
$ nix run --override-input nixpkgs nixpkgs/nixos-21.05 --impure github:guibou/nixGL -- nix run blender-bin#blender_3_1
Looks quite complicated as it means that I need to know the nixpkgs version used by my softwares, and in some cases (for instance for tools built without nix or for which I lost the derivation), I'm not even sure which nixpkgs version I should use.
I'm not sure why, but other distributions does not run in such hassle, I can run basically any software I like. It would be great if NixOs had ways to avoid such issues...
First, thanks for this up to date repository. Unfortunately, I can't make it work:
Any idea what I may be missing?