about summary refs log tree commit diff
diff options
context:
space:
mode:
authorStéphan Kochen <git@stephank.nl>2021-11-16 16:32:10 +0100
committerStéphan Kochen <git@stephank.nl>2021-11-17 15:11:33 +0100
commitddb000cb11375b2ee50fcbcb2fb72ef2cdc80f3c (patch)
treef197327efb4dace6b8cfd6069da48df378c4f55b
parent12fc0f19fefa9dff68bc3e0938b815ab8d89df90 (diff)
cargo-msrv: add rustup to propagatedBuildInputs
-rw-r--r--pkgs/development/tools/rust/cargo-msrv/default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/development/tools/rust/cargo-msrv/default.nix b/pkgs/development/tools/rust/cargo-msrv/default.nix
index 18b432df7b4dd..33e9fca441fb5 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)";