Nix build - SDLCallFailed
Closed this issue · 7 comments
I can successfully build the monomer project using nix build
. However the resulting binaries have some problems:
./result/bin/todo
Invalid window
todo: SDLCallFailed {sdlExceptionCaller = "SDL.Video.glCreateContext", sdlFunction = "SDL_GL_CreateContext", sdlExceptionError = "Invalid window"}
Hi @prolic!
I don't know much about Nix, so I'm probably not the best person to help here (although it's high on my list of things to learn). Looking at a comment made by @smunix (the contributor of the Nix and GitHub Actions configuration), it seems you should run the applications with a different command:
nix run .#todo
I remember running them successfully in an Ubuntu VM.
Doesn't seem to work either. Feel free to close this issue if you want to. I'm just struggling myself for over a week to setup nix for my project.
Just to be sure: have you checked nixGL? The error you're getting can probably be fixed by using it.
I'll close this issue for now. Please re-open if needed. Thanks!
Just to be sure: have you checked nixGL? The error you're getting can probably be fixed by using it.
I was seeing this error on a different monomer project on NixOS. I don't know if I had the same root cause as the original poster but when I ran the app under nixGL instead, the problem went away and the app works.
I can confirm that nixGL fixes the problem. However I decided to move forward without nix builds. Thanks.