The hardcoded cargo hash could have been left unchanged on package updates. By breaking the build explicitly we ensure partial updates won't accidentally slip past us.
···17, qtwebengine
18, rustPlatform
19, srcs
20+21+# These must be updated in tandem with package updates.
22+, cargoShaForVersion ? "21.08"
23+, cargoSha256 ? "1pbvw9hdzn3i97mahdy9y6jnjsmwmjs3lxfz7q6r9r10i8swbkak"
24}:
2526+# Guard against incomplete updates.
27+# Values are provided as callPackage inputs to enable easier overrides through overlays.
28+if cargoShaForVersion != srcs.angelfish.version
29+then builtins.throw ''
30+ angelfish package update is incomplete.
31+ Hash for cargo dependencies is declared for version ${cargoShaForVersion}, but we're building ${srcs.angelfish.version}.
32+ Update the cargoSha256 and cargoShaForVersion for angelfish.
33+'' else
34+35mkDerivation rec {
36 pname = "angelfish";
3738 cargoDeps = rustPlatform.fetchCargoTarball {
39 src = srcs.angelfish.src;
40 name = "${pname}-${srcs.angelfish.version}";
41+ sha256 = cargoSha256;
42 };
4344 nativeBuildInputs = [