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

Nim hash not updated in nimble.nix #6765

Closed
ekimber opened this issue Dec 16, 2024 · 6 comments
Closed

Nim hash not updated in nimble.nix #6765

ekimber opened this issue Dec 16, 2024 · 6 comments

Comments

@ekimber
Copy link

ekimber commented Dec 16, 2024

Describe the bug
There's a comment in the file nix/nimble.nix :

WARNING: Requires manual updates when Nim compiler version changes.

It looks like it wasn't updated, resulting in a hash mismatch

error: hash mismatch in fixed-output derivation '/nix/store/fzkjrmna2fxl540g3mxgc8jqf1v41d8v-source.drv':
specified: sha256-sa0irAZjQRZLduEMBPf7sHlY1FigBJTR/vIH4ihii/w=
got: sha256-MVHf19UbOWk8Zba2scj06PxdYYOJA6OXrVyDQ9Ku6Us=
error: 1 dependencies of derivation '/nix/store/gd7dgkqnmp2kkkf1wpqjdj598bqna2ha-nimbus-eth2-24.12.0-4e440277.drv' failed to build

To Reproduce

  1. Run a nix build using the nimbus-eth2 flake as an input
  2. Get a hash mismatch

Additional context
@jakubgs since you commented in the ethereum.nix repo. The flake is great and makes everything super easy! I don't know what to suggest here though, obviously it is trivial to fix the hash but it's going to be missed again unless there's a CI test to catch it.

@tersec
Copy link
Contributor

tersec commented Dec 24, 2024

There are Nix CIs and they seem to be running fine:

But it's possible there are issues here.

@tersec
Copy link
Contributor

tersec commented Dec 26, 2024

Does

@ekimber
Copy link
Author

ekimber commented Dec 26, 2024

Does

Yes this is fixed now 👍

I can't see any nix in the CI but it's not something I'm familiar with

@ekimber ekimber closed this as completed Dec 26, 2024
@jakubgs
Copy link
Member

jakubgs commented Jan 3, 2025

Indeed, I was able to reproduce this on our linux-05 CI host when building from stable:

jenkins@linux-05:~/nimbus-eth2$ nix build --print-build-logs '.?submodules=1#'
source> trying https://github.com/nim-lang/nimble/archive/46e2ae13eeb95619a371a74d16efc5aff30ea371.tar.gz
source>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
source>                                  Dload  Upload   Total   Spent    Left  Speed
source>   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
source> 100  618k    0  618k    0     0   782k      0 --:--:-- --:--:-- --:--:--  782k
source> unpacking source archive /build/46e2ae13eeb95619a371a74d16efc5aff30ea371.tar.gz
error: hash mismatch in fixed-output derivation '/nix/store/fzkjrmna2fxl540g3mxgc8jqf1v41d8v-source.drv':
         specified: sha256-sa0irAZjQRZLduEMBPf7sHlY1FigBJTR/vIH4ihii/w=
            got:    sha256-MVHf19UbOWk8Zba2scj06PxdYYOJA6OXrVyDQ9Ku6Us=
error: 1 dependencies of derivation '/nix/store/hgciddz73gz31kj0lla1ca2qpbxx3jv9-nimbus-eth2-24.12.0-4e440277.drv' failed to build

But the issue no longer exists in unstable.

@tersec
Copy link
Contributor

tersec commented Jan 3, 2025

Indeed, I was able to reproduce this on our linux-05 CI host when building from stable:

jenkins@linux-05:~/nimbus-eth2$ nix build --print-build-logs '.?submodules=1#'
source> trying https://github.com/nim-lang/nimble/archive/46e2ae13eeb95619a371a74d16efc5aff30ea371.tar.gz
source>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
source>                                  Dload  Upload   Total   Spent    Left  Speed
source>   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
source> 100  618k    0  618k    0     0   782k      0 --:--:-- --:--:-- --:--:--  782k
source> unpacking source archive /build/46e2ae13eeb95619a371a74d16efc5aff30ea371.tar.gz
error: hash mismatch in fixed-output derivation '/nix/store/fzkjrmna2fxl540g3mxgc8jqf1v41d8v-source.drv':
         specified: sha256-sa0irAZjQRZLduEMBPf7sHlY1FigBJTR/vIH4ihii/w=
            got:    sha256-MVHf19UbOWk8Zba2scj06PxdYYOJA6OXrVyDQ9Ku6Us=
error: 1 dependencies of derivation '/nix/store/hgciddz73gz31kj0lla1ca2qpbxx3jv9-nimbus-eth2-24.12.0-4e440277.drv' failed to build

But the issue no longer exists in unstable.

stable uses Nimble 0.16.2, while unstable uses Nimble 0.16.4. They require different build setups, and obviously have different hashes. It's not intended for the Nix derivation in unstable now to apply to stable, only unstable. After the next release, the mismatch should vanish.

@jakubgs
Copy link
Member

jakubgs commented Jan 3, 2025

Yeah, but there is clearly an issue with some Nix derivation caching that is causing us to miss when the hash needs to be updated. Which normally is every time Nim is updated.

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 a pull request may close this issue.

3 participants