Skip to content
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

fix: only generate a version file if nvidiaVersion isn't set #130

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cfhammill
Copy link

When using nixGL in a flake, it would be convenient to use the auto.nixGLDefault attribute to generate a nixGL wrapper (previously I was generating nixGLnvidia-<version>.

auto.nixGLDefault can't be used in a flake because there are two impure operations, first is generating the version file, and second is fetching the sha256 for the runfile.

This PR prevents those two operations from occuring if the user provides nvidiaVersion and nvidiaHash arguments to nixGL

Hunk 1: prevents the version file generation if nvidiaVersion is passed, see the comment in the code for why this works
Hunk 2: simply passes nvidiaHash to nvidiaPackages, in the case nvidiaHash is null, this should fetch the hash as before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant