Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
Draft

Flake #155

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# NOTE: requires impure because of nixgl
use flake . --impure
Comment on lines +1 to +2
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposing to make a conditional check that uses impure on non-nixos setup and pure on nixos to keep the environment reproducible or some other management to avoid the impurity e.g. https://github.com/nix-community/nixGL?tab=readme-ov-file#install-nixgl which seems to install nixGL in the user profile, but i don't have much experience with it.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nixgl cannot be used purely right now - see this discussion nix-community/nixGL#90
the link you posted also suggests to use --impure
i also want it to be pure but i found no way of doing this right now
for some reason unknown to me nixgl uses builtins.currentTime which cannot be used purely
if you know of a way to make it work purely id be happy to make a change

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a better solution atm. worst case if you are going to merge it with the --impure flag then i would suggest making an issue about it in verso for long-term tracking.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well FWIW one way that comes to mind rn, but feels a bit hacky is to declaratively make a shell application via writeShellApplication alike how i do tasks in nixium https://github.com/NiXium-org/NiXium/tree/central/tasks/administration/build as the way i understand it is that the script creation happens during nix's eval phase that then executes the created script with it's environment outside of nix's build envrionment to have the ability to use impure things, but i literally looked into nixgl yesterday and didn't have time to test if this is a good solution yet

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#157 added one rn so i dont forget

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sry im not smart enough to understand everything ur saying
id like to merge it impurely right now as its better than just a shell.nix imo but let someone smarter take care of the purity - or myself when i learn more about nix

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's okay everyone sucks at nix :D I try to look into it as i am researching nixGL myself rn and if i find a way i try to submit it here as well

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ resources/
.flatpak-builder/
libmozjs*
cargo-sources.json
.direnv/
Loading