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

Hash mismatch #32

Open
CrystalKeck27 opened this issue Mar 22, 2024 · 1 comment
Open

Hash mismatch #32

CrystalKeck27 opened this issue Mar 22, 2024 · 1 comment
Assignees

Comments

@CrystalKeck27
Copy link

I'm new to NixOS so please take everything I say and do with a grain of salt.

I just tried to use this flake, but on rebuild I ran into this error:

error: hash mismatch in fixed-output derivation '/nix/store/fj7093nqfbrm2q7k2fg35bw6nianfs7f-digilent.adept.runtime_2.27.9-amd64.deb.drv':
         specified: sha256-T8e+YnYUJMWswpgPb1C1GXagCZe9tURj9y3tvWs2Kus=
            got:    sha256-yKLM8tnqH/oPOkrk7S/2kKBof/gzgrYtrjD6ExmLv1M=

It seems that the adept runtime has been updated without changing the version, or something along those lines.

I was able to successfully install waveforms by forking this repo and manually changing the hash in data/packages.json.

Now, as previously stated, I am no NixOS expert, but I have two ideas for a solution:

  1. Allow users to override the hash in their own nix configs.
  2. Update the scraper to refresh the hashes too.

I'll look into the viability of the first solution on my own as I feel it would be a good way to learn the nix language. I leave it up to you if you want to update the scraper.

@liff
Copy link
Owner

liff commented Mar 24, 2024

I’ve updated the hashes. Not sure why they were out of date, looks like adept2-runtime hasn’t seen a new release in a good while. The scraper should update its hashes too if an update ever occurs.

Allow users to override the hash in their own nix configs.

nixpkgs has a generic mechanism for this called overlays. In this situation you could have used something like:

self: super: {
  adept2-runtime = super.adept2-runtime.overrideAttrs (old: 
    src = self.fetchurl {
      url = "…";
      hash = "<correct hash>";
    };
  );
}

@liff liff self-assigned this Mar 24, 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

No branches or pull requests

2 participants