default-crate-overrides: proc-macro-crate: fix build for 3.3.0

https://github.com/bkchr/proc-macro-crate/commit/db99213ae08c7f6cd1dadda60c3b42d16f2c0099
This commit is contained in:
Defelo
2025-03-11 00:13:48 +01:00
parent 6537f876c0
commit ef6e4ee7e5
@@ -346,14 +346,14 @@
};
# Assumes it can run Command::new(env::var("CARGO")).arg("locate-project")
# 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
proc-macro-crate = attrs: lib.optionalAttrs (lib.versionAtLeast attrs.version "2.0") {
postPatch = (attrs.postPatch or "") + ''
substituteInPlace \
src/lib.rs \
--replace-fail \
'env::var("CARGO").map_err(|_| Error::CargoEnvVariableNotSet)?' \
'"${lib.getBin buildPackages.cargo}/bin/cargo"'
'env::var("CARGO")' \
'Ok::<_, core::convert::Infallible>("${lib.getBin buildPackages.cargo}/bin/cargo")'
'';
};
}