diff --git a/pkgs/development/tools/rust/cargo-msrv/default.nix b/pkgs/development/tools/rust/cargo-msrv/default.nix index 18b432df7b4d..33e9fca441fb 100644 --- a/pkgs/development/tools/rust/cargo-msrv/default.nix +++ b/pkgs/development/tools/rust/cargo-msrv/default.nix @@ -3,10 +3,12 @@ , fetchFromGitHub , nix-update-script , pkg-config +, rustup , openssl , stdenv , libiconv , Security +, makeWrapper }: rustPlatform.buildRustPackage rec { @@ -35,7 +37,12 @@ rustPlatform.buildRustPackage rec { then [ libiconv Security ] else [ openssl ]; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ pkg-config makeWrapper ]; + + # Depends at run-time on having rustup in PATH + postInstall = '' + wrapProgram $out/bin/cargo-msrv --prefix PATH : ${lib.makeBinPath [ rustup ]}; + ''; meta = with lib; { description = "Cargo subcommand \"msrv\": assists with finding your minimum supported Rust version (MSRV)";