Skip to content

Commit 72afce5

Browse files
committed
shell.nix: use different cargoHash for Nixpkgs >= 25.05pre
It seems like something has changed in the way that Nix or Cargo calculates the hash over the locked Cargo dependencies, which causes builds to break on Nixpkgs >= 25.05. For the time being, let's do a version check and support both Nixpkgs >= 25.05pre and < 25.05pre with different `cargoHash`es.
1 parent c0fa1f3 commit 72afce5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

shell.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ let
3535
sha256 = "sha256-+VeWLBI6md399Oaumt4pJrOkm0Nz7fmpXN2TjglUE34=";
3636
};
3737

38-
cargoHash = "sha256-UHAwk1fBcabRqy7VMhz4aoQuIur+MQshDOhC7KFyGm4=";
38+
cargoHash =
39+
if lib.versionAtLeast lib.version "25.05pre" then
40+
"sha256-C1hg2/y557jRLkSBvFLxYKH+t8xEJudDvU72kO9sPug="
41+
else
42+
"sha256-UHAwk1fBcabRqy7VMhz4aoQuIur+MQshDOhC7KFyGm4=";
3943
};
4044

4145
# The formatting scripts require a specific version of uncrustify:

0 commit comments

Comments
 (0)