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

Nixhash #120

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Nixhash #120

wants to merge 2 commits into from

Conversation

zimbatm
Copy link
Member

@zimbatm zimbatm commented Jul 27, 2024

Refactor the nixhash package to make it more user friendly. Make narinfos compatible with Cachix

1. Extend to support all the encodings and algos supported by Nix.
2. Type things to make invalid representation harder.
3. Hide struct fields so validation only has to be done on construction.
4. Rename to `nixhash` so it doesn't clash with the stdlib hash package
   (and to make the back-compat breakage more obvious).
Nix can parse the hash in different ways, and Cachix decided to use
Base16 for one of the fields.
@zimbatm
Copy link
Member Author

zimbatm commented Jul 27, 2024

Rebasing. Looks like I was working on an old branch

@flokli flokli marked this pull request as draft July 27, 2024 16:42
@flokli
Copy link
Collaborator

flokli commented Jul 27, 2024

Pls undraft when ready, happy to take a look then!

zimbatm added a commit to numtide/nar-serve that referenced this pull request Jul 27, 2024
Fixes the issues with cachix
zimbatm added a commit to numtide/nar-serve that referenced this pull request Jul 27, 2024
Fixes the issues with cachix
zimbatm added a commit to numtide/nar-serve that referenced this pull request Jul 27, 2024
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.

2 participants