nixGL
nixGL copied to clipboard
`nix-shell` example?
Hi, thanks for creating this.
Could you please add an example with nix-shell?
For example, if I'm running an application with nix-shell like this:
NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/7b1777b1e47d730dea558a5cd9b381cdee7b4f14.tar.gz nix-shell -p element-desktop --run element-desktop
How do I modify the above command to run element-desktop via nixGL?
Is a one-liner possible? Or do I have to create a .nix file for every occasion?
Thank you.
I figured it out:
export NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/7b1777b1e47d730dea558a5cd9b381cdee7b4f14.tar.gz
$(nix-build https://github.com/nix-community/nixGL/archive/master.tar.gz -A nixGLIntel)/bin/nixGLIntel \
nix-shell -p element-desktop --run element-desktop
To sum it up:
- Prefix the command with the output of `$(nix-build URL-to-this-repo-tarball -A nixGLTheFlavorYouWant)/bin/nixGLTheFlavorYouWant
- Make sure that nixGL and your application are targeting the same nixpkgs version, otherwise you may get glib version mismatches.