blob: 33e9fca441fb5407acb4bd76920dee7149b00ba9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
{ lib
, rustPlatform
, fetchFromGitHub
, nix-update-script
, pkg-config
, rustup
, openssl
, stdenv
, libiconv
, Security
, makeWrapper
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-msrv";
version = "0.12.0";
src = fetchFromGitHub {
owner = "foresterre";
repo = pname;
rev = "v${version}";
sha256 = "sha256-zc6jJqG7OGqfsPnb3VeKmEnz8AL2p1wHqgDvHQC5OX8=";
};
cargoSha256 = "sha256-SjgYkDDe11SVN6rRZTi/fYB8CgYhu2kfSXrIyimlhkk=";
passthru = {
updateScript = nix-update-script {
attrPath = pname;
};
};
# Integration tests fail
doCheck = false;
buildInputs = if stdenv.isDarwin
then [ libiconv Security ]
else [ openssl ];
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)";
homepage = "https://github.com/foresterre/cargo-msrv";
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ otavio ];
};
}
|