···131131This will retrieve the dependencies using fixed-output derivations from
132132the specified lockfile.
133133134134-Alternatively, `cargoLock.lockFileContents` can be set to a string of
135135-the contents of a `Cargo.lock` file, for example if you need to
136136-preprocess or generate the file as part of your build:
137137-134134+One caveat is that `Cargo.lock` cannot be patched in the `patchPhase`
135135+because it runs after the dependencies have already been fetched. If
136136+you need to patch or generate the lockfile you can alternatively set
137137+`cargoLock.lockFileContents` to a string of its contents:
138138139139```nix
140140rustPlatform.buildRustPackage {