diff --git a/pkgs/development/tools/rust/cargo-docset/default.nix b/pkgs/development/tools/rust/cargo-docset/default.nix new file mode 100644 index 000000000000..8565d7f08408 --- /dev/null +++ b/pkgs/development/tools/rust/cargo-docset/default.nix @@ -0,0 +1,34 @@ +{ lib +, fetchFromGitHub +, gitUpdater +, rustPlatform +, sqlite +}: + +rustPlatform.buildRustPackage rec { + pname = "cargo-docset"; + version = "0.3.1"; + + src = fetchFromGitHub { + owner = "Robzz"; + repo = pname; + rev = "v${version}"; + hash = "sha256-o2CSQiU9fEoS3eRmwphtYGZTwn3mstRm2Tlvval83+U="; + }; + + cargoHash = "sha256-YHrSvfHfQ7kbVeCOgggYf3E7gHq+RhVKZrzP8LqX5I0="; + + buildInputs = [ sqlite ]; + + passthru.updateScript = gitUpdater { + rev-prefix = "v"; + }; + + meta = with lib; { + description = "Cargo subcommand to generate a Dash/Zeal docset for your Rust packages"; + homepage = "https://github.com/Robzz/cargo-docset"; + changelog = "https://github.com/Robzz/cargo-docset/blob/${version}/CHANGELOG.md"; + license = licenses.asl20; + maintainers = with maintainers; [ colinsane ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4dd0082b31c4..98e03c64d920 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16519,6 +16519,7 @@ with pkgs; }; cargo-deb = callPackage ../development/tools/rust/cargo-deb { }; cargo-deps = callPackage ../development/tools/rust/cargo-deps { }; + cargo-docset = callPackage ../development/tools/rust/cargo-docset { }; cargo-edit = callPackage ../development/tools/rust/cargo-edit { inherit (darwin.apple_sdk.frameworks) Security; };