forked from mirrors/nixpkgs
Merge pull request #146258 from stephank/fix/cargo-msrv
This commit is contained in:
commit
6ed9157983
|
@ -3,10 +3,12 @@
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, nix-update-script
|
, nix-update-script
|
||||||
, pkg-config
|
, pkg-config
|
||||||
|
, rustup
|
||||||
, openssl
|
, openssl
|
||||||
, stdenv
|
, stdenv
|
||||||
, libiconv
|
, libiconv
|
||||||
, Security
|
, Security
|
||||||
|
, makeWrapper
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
|
@ -35,7 +37,12 @@ rustPlatform.buildRustPackage rec {
|
||||||
then [ libiconv Security ]
|
then [ libiconv Security ]
|
||||||
else [ openssl ];
|
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; {
|
meta = with lib; {
|
||||||
description = "Cargo subcommand \"msrv\": assists with finding your minimum supported Rust version (MSRV)";
|
description = "Cargo subcommand \"msrv\": assists with finding your minimum supported Rust version (MSRV)";
|
||||||
|
|
Loading…
Reference in a new issue