2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, stdenv
|
|
|
|
, curl
|
|
|
|
, openssl
|
|
|
|
, darwin
|
|
|
|
, libgit2_1_3_0
|
|
|
|
}:
|
2021-09-22 15:38:15 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-dephell";
|
|
|
|
version = "0.5.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mimoo";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-NOjkKttA+mwPCpl4uiRIYD58DlMomVFpwnM9KGfWd+w=";
|
2021-09-22 15:38:15 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
curl
|
|
|
|
];
|
2021-09-22 15:38:15 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
] ++ lib.optional stdenv.isDarwin [
|
|
|
|
curl
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
libgit2_1_3_0
|
|
|
|
];
|
2021-09-22 15:38:15 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
# update Cargo.lock to work with openssl 3
|
|
|
|
postPatch = ''
|
|
|
|
ln -sf ${./Cargo.lock} Cargo.lock
|
|
|
|
'';
|
2021-09-22 15:38:15 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A tool to analyze the third-party dependencies imported by a rust crate or rust workspace";
|
|
|
|
homepage = "https://github.com/mimoo/cargo-dephell";
|
|
|
|
license = with licenses; [ mit /* or */ asl20 ];
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|