We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 29d9c00 + dbb19a6 commit 1012e87Copy full SHA for 1012e87
pkgs/build-support/rust/default-crate-overrides.nix
@@ -359,14 +359,14 @@ in
359
};
360
361
# Assumes it can run Command::new(env::var("CARGO")).arg("locate-project")
362
- # https://github.com/bkchr/proc-macro-crate/blame/master/src/lib.rs#L244
+ # https://github.com/bkchr/proc-macro-crate/blame/master/src/lib.rs#L242
363
proc-macro-crate = attrs: lib.optionalAttrs (lib.versionAtLeast attrs.version "2.0") {
364
- prePatch = (attrs.prePatch or "") + ''
+ postPatch = (attrs.postPatch or "") + ''
365
substituteInPlace \
366
src/lib.rs \
367
--replace-fail \
368
- 'env::var("CARGO").map_err(|_| Error::CargoEnvVariableNotSet)?' \
369
- '"${lib.getBin buildPackages.cargo}/bin/cargo"'
+ 'env::var("CARGO")' \
+ 'Ok::<_, core::convert::Infallible>("${lib.getBin buildPackages.cargo}/bin/cargo")'
370
'';
371
372
}
0 commit comments