1{ lib, rustPlatform, fetchFromGitHub, stdenv, darwin }:
2
3rustPlatform.buildRustPackage rec {
4 pname = "cargo-modules";
5 version = "0.11.0";
6
7 src = fetchFromGitHub {
8 owner = "regexident";
9 repo = pname;
10 rev = version;
11 hash = "sha256-EzXQ4YQFpK7vFI/qpANSOHTKH/XgPnNNp+JngSJqlgY=";
12 };
13
14 cargoHash = "sha256-KWehtgFxi0DgsQaYnxPFpNifgihiADvKqL4fFY14I84=";
15
16 buildInputs = lib.optionals stdenv.isDarwin [
17 darwin.apple_sdk.frameworks.CoreServices
18 ];
19
20 meta = with lib; {
21 description = "A cargo plugin for showing a tree-like overview of a crate's modules";
22 homepage = "https://github.com/regexident/cargo-modules";
23 changelog = "https://github.com/regexident/cargo-modules/blob/${version}/CHANGELOG.md";
24 license = with licenses; [ mpl20 ];
25 maintainers = with maintainers; [ figsoda rvarago matthiasbeyer ];
26 };
27}