Closed ellie closed 3 months ago
I ran nix flake update
, but it looks like things are more broken than an outdated lockfile 😞
Do either of you know what's up? cc @arcuru @Sciencentistguy
Here's the error:
<super super long stack trace that's impossible to read>
… while evaluating the argument passed to builtins.fromTOML
… while calling the 'readFile' builtin
at /nix/store/f5ykynf933aab7nd1arqz6dm79hdh91q-source/lib/trivial.nix:722:24:
721| importTOML = path:
722| builtins.fromTOML (builtins.readFile path);
| ^
723|
… while realising the context of path '/nix/store/99hlq6kn4ww9y617wc093pnng24kbidc-channel-rust-1.80.toml'
error: hash mismatch in fixed-output derivation '/nix/store/iv1pn1rf4c487gz0vv2yxwgmila27dbm-channel-rust-1.80.toml.drv':
specified: sha256-Ngiz76YP4HTY75GGdH2P+APE/DEIx2R/Dn+BwwOyzZU=
got: sha256-6eN/GKzjVSjEhGO9FhWObkRFaE1Jf+uqMSdQnb8lcB4=
It's just a hash mismatch, it looks like he never explained how to update.
The method that you're using for the Rust toolchain requires pinning the hash of the toolchain file in flake.nix. So you need to manually update that as well every time you update the Rust Toolchain.
error: hash mismatch in fixed-output derivation '/nix/store/iv1pn1rf4c487gz0vv2yxwgmila27dbm-channel-rust-1.80.toml.drv':
specified: sha256-Ngiz76YP4HTY75GGdH2P+APE/DEIx2R/Dn+BwwOyzZU=
got: sha256-6eN/GKzjVSjEhGO9FhWObkRFaE1Jf+uqMSdQnb8lcB4=
Just change the line in the flake.nix file from "sha256-Ngiz..." to the new "sha256-6eN..." and it should work fine. I tested locally.
Thanks you!
~That's weird 🤔 It doesn't update when I run nix flake update
?~
Ahhh I see. I misunderstood and thought this was originating from the lockfile! Thanks 🙏
Yeah the fenix library requires you to specify the hash of your toolchain file. In theory this isn't needed, as it is a local file and versioned by git, but the library does not have the ability to detect this. (the hash is needed for non-local files to ensure reproducability)
In general with Nix issues if there's a hash mismatch the solution is to update the mismatched hash with the new one, fwiw.
Thank you both! I managed this with the last update too 🤦♀️
sorry for the needless ping!
Checks