-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add flake file #13
base: excelsior
Are you sure you want to change the base?
Add flake file #13
Conversation
Usage: ``` nix run # run tangerine (default package) nix develop # enter development shell (cmake + dependencies available) nix build # get tangerine built and available in result/bin/ ```
name = "tangerine"; | ||
patches = [ | ||
(pkgs.fetchpatch { | ||
url = "https://github.com/Aeva/tangerine/pull/12/commits/2d7d1ae1e21e8fe52df2c4a33e947b2ff6b07812.patch"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would be your other pull request, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct - once it's merged / updated, the list here can be updated.
@viraptor nixGLIntel is fine for me, but I'm a little surprised that needs to be specified? I would have thought SDL2 would pull in an appropriate GL backend? I'm a total noob to nix, so I think I need to spend some time learning what flakes is and how it works before I can give this a proper review. I think what I'm missing is a high level map of the many many ways one can install packages on nixos. |
@Aeva So because of the idea of pure environment and no "system" dependencies this makes GL tricky. You could run in an impure environment and use system GL libraries through LD_LIBRARY_PATH (https://nixos.org/manual/nixpkgs/stable/#sec-opengl). But if you want things to "just work" with consistent version between runs (proper nixpkgs way), then mesa becomes part of your environment and you have to explicitly pull it into the package environment. |
I'm confused. What's the normal way for OpenGL applications to be packaged, given that a user might need a completely different OpenGL subsystem depending on which vendor made their graphics card? |
(chucks the app over the wall) "It's user's problem now." Or more specifically, if you distribute it in nixpkgs, that side does not care about the opengl implementation at all. The user can run it through, for example:
which does some magic to select nvidia, or other driver. For apps you normally use, you'd provide your own wrapper for them (like this PR does for the flake specifically), or use something like nix-community/home-manager#5355 with home-manager to do it semi-automatically. It's been a long-standing issue to implement it properly. |
Usage:
To enable flake commands in your environment, see https://nixos.wiki/wiki/Flakes#Enable_flakes_permanently_in_NixOS
Depending on your environment, you may want nixGLNvidia instead of nixGLIntel. I didn't go as far as parametrising / exposing that.