I am trying to see how much I can achieve with flox as a replacement for a system package manager. So instead of using apt
on Ubuntu and brew
on macOS, I would use flox
on both (and maybe even on nixOS?). So despite recommendations to the contrary I am trying to install GUI applications
When I flox install alacritty
and run alacritty I get the following error:
Error: Error { raw_code: None, raw_os_message: None, kind: NotSupported("provided display handle is not supported") }
As far as I can tell (see previous link) this is because I don’t have nixGL. However when I try to install nixGL with flox install github:guibou/nixGL#nixGLDefault
I get the following error:
❌ ERROR: Caught Nix error while locking flake:
error:
… while evaluating the attribute 'auto.nixGLDefault'
at /nix/store/wnf3rly6jbw4ywqhzgn0vl6lk8hwgkg3-source/nixGL.nix:243:7:
242| # nixGLNvidia or nixGLIntel using an heuristic.
243| nixGLDefault = if nvidiaVersionAuto != null then
| ^
244| nixGLCommon autoNvidia.nixGLNvidia
… while evaluating a branch condition
at /nix/store/wnf3rly6jbw4ywqhzgn0vl6lk8hwgkg3-source/nixGL.nix:243:22:
242| # nixGLNvidia or nixGLIntel using an heuristic.
243| nixGLDefault = if nvidiaVersionAuto != null then
| ^
244| nixGLCommon autoNvidia.nixGLNvidia
(stack trace truncated; use '--show-trace' to show the full trace)
error: attribute 'currentTime' missing
at /nix/store/wnf3rly6jbw4ywqhzgn0vl6lk8hwgkg3-source/nixGL.nix:223:18:
222| # Add an impure parameter to force the rebuild on each access.
223| time = builtins.currentTime;
| ^
224| preferLocalBuild = true;
I also tried flox install github:nix-community/nixGL
since that appears to be the new address.
I found an upstream report of the same issue that suggested the solution was:
nix profile install github:guibou/nixGL#nixGLNvidia --impure
Is there an --impure
equivalent for flox, or can I specify it in manifest.toml
? If not can I simply run this nix command in my flox environment to achieve the same effect?
(Note, both alacritty
and nixGL
are theoretical targets for me, I’m just attempting to install any cross-platform GUI application.)