I’m packaging an application that specifies a minimum supported Rust version and would like to mark it as broken with lower versions:
{ lib, rustPlatform }:
rustPlatform.buildRustPackage {
# …
meta = {
# Minimum supported Rust version specified by Cargo.toml
broken = lib.versionOlder rustPlatform.rust.rustc.version "1.75.0";
};
}
This technically works, but it tells me I’m doing it wrong:
warning: rustPlatform.rust.rustc is deprecated. Use rustc instead.
What’s the correct way to make this check? It doesn’t make sense to add rustc
to the inputs just to satisfy this warning since that input isn’t actually used and that would fail to detect that overriding rustPlatform
unbreaks the package.