nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 pkg-config,
6 stdenv,
7 curl,
8 openssl,
9 libgit2,
10}:
11
12rustPlatform.buildRustPackage rec {
13 pname = "cargo-dephell";
14 version = "0.5.1";
15
16 src = fetchFromGitHub {
17 owner = "mimoo";
18 repo = "cargo-dephell";
19 rev = "v${version}";
20 hash = "sha256-NOjkKttA+mwPCpl4uiRIYD58DlMomVFpwnM9KGfWd+w=";
21 };
22
23 cargoPatches = [
24 # update Cargo.lock to work with openssl 3
25 ./openssl3-support.patch
26 ];
27
28 cargoHash = "sha256-+5ElAfYuUfosXzR3O2QIFGy4QJuPrWDMg5LacZKi3c8=";
29
30 nativeBuildInputs = [
31 pkg-config
32 ]
33 ++ lib.optionals stdenv.hostPlatform.isDarwin [
34 curl
35 ];
36
37 buildInputs = [
38 openssl
39 ]
40 ++ lib.optionals stdenv.hostPlatform.isDarwin [
41 curl
42 libgit2
43 ];
44
45 env = {
46 LIBGIT2_NO_VENDOR = 1;
47 };
48
49 meta = {
50 description = "Tool to analyze the third-party dependencies imported by a rust crate or rust workspace";
51 mainProgram = "cargo-dephell";
52 homepage = "https://github.com/mimoo/cargo-dephell";
53 license = with lib.licenses; [
54 mit # or
55 asl20
56 ];
57 maintainers = with lib.maintainers; [
58 matthiasbeyer
59 ];
60 };
61}