nixpkgs/pkgs/development/tools/rust/cargo-docset/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

36 lines
868 B
Nix

{ 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";
mainProgram = "cargo-docset";
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 matthiasbeyer ];
};
}