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: replaces the hash package and support for Cachix #127

Merged
merged 2 commits into from
Dec 31, 2024

Conversation

kalbasit
Copy link
Contributor

  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).
  5. Add compatibility with Cachix (base16).

This PR is a rebase of #120 over the main branch and replaces it. cc @zimbatm for review by original author.

closes #120

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.
Copy link
Member

@zimbatm zimbatm left a comment

Choose a reason for hiding this comment

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

Perfect, thanks @kalbasit

@zimbatm zimbatm merged commit b5eacc9 into nix-community:main Dec 31, 2024
8 checks passed
@kalbasit kalbasit deleted the nixhash branch December 31, 2024 18:41
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