If you can read the source code of buildRustPackage you’ll find the solution. If you can’t, take a look at Is it possible to override cargoSha256 in buildRustPackage? - #3 by aszlig.
Basically,
cargoDeps = rustPlatform.importCargoLock {
lockFile = ./Cargo.lock;
outputHashes = {
"smithay-client-toolkit-0.16.0" = "iPDL7pxTez4EnIBaUH25lLSWpu3RRL2QBF9pfdTDsP8=";
};
};