summary refs log tree commit diff
path: root/pkgs/tools/package-management/cargo-update/default.nix
blob: c0a1e8edc0f4b8ae5b2190cf94bb63ff69e03f48 (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
{ stdenv
, rustPlatform
, fetchFromGitHub
, cmake
, curl
, libgit2
, libssh2
, openssl
, pkg-config
, zlib }:

rustPlatform.buildRustPackage rec {
  pname = "cargo-update";
  version = "3.0.0";

  src = fetchFromGitHub {
    owner = "nabijaczleweli";
    repo = pname;
    rev = "v${version}";
    sha256 = "1jyfv8aa0gp67pvv8l2vkqq4j9rgjl4rq1wn4nqxb44gmvkg15l3";
  };

  cargoPatches = [ ./0001-Generate-lockfile-for-cargo-update-v3.0.0.patch ];
  cargoSha256 = "034v1ql5k3n3rgi3aqszkybvv3vc80v263c9nlwxcwbswsh9jpp1";

  nativeBuildInputs = [ cmake ];
  buildInputs = [ libgit2 libssh2 openssl pkg-config zlib ]
    ++ stdenv.lib.optional stdenv.isDarwin curl;

  meta = with stdenv.lib; {
    description = "A cargo subcommand for checking and applying updates to installed executables";
    homepage = "https://github.com/nabijaczleweli/cargo-update";
    license = licenses.mit;
    maintainers = with maintainers; [ gerschtli filalex77 ];
    platforms = platforms.all;
  };
}