From ddb000cb11375b2ee50fcbcb2fb72ef2cdc80f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Kochen?= Date: Tue, 16 Nov 2021 16:32:10 +0100 Subject: [PATCH] cargo-msrv: add rustup to propagatedBuildInputs --- pkgs/development/tools/rust/cargo-msrv/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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)";