mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
46 lines
1.3 KiB
Nix
46 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
stdenv,
|
|
libgit2,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "cocogitto";
|
|
version = "7.0.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "oknozor";
|
|
repo = "cocogitto";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-Z+SXB6bDxyR+Bt3Pz6uF9+sZLjbiFNYeECVFZbx40h8=";
|
|
};
|
|
|
|
cargoHash = "sha256-TGcgiXLgxeOO44eNfd9F0VonTTJhOn1iEJwrO65wcxk=";
|
|
|
|
# Test depend on git configuration that would likely exist in a normal user environment
|
|
# and might be failing to create the test repository it works in.
|
|
doCheck = false;
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
buildInputs = [ libgit2 ];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd cog \
|
|
--bash <($out/bin/cog generate-completions bash) \
|
|
--fish <($out/bin/cog generate-completions fish) \
|
|
--zsh <($out/bin/cog generate-completions zsh)
|
|
'';
|
|
|
|
meta = {
|
|
changelog = "https://github.com/cocogitto/cocogitto/blob/${finalAttrs.src.tag}/CHANGELOG.md";
|
|
description = "Set of cli tools for the conventional commit and semver specifications";
|
|
mainProgram = "cog";
|
|
homepage = "https://docs.cocogitto.io/";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ gs-101 ];
|
|
};
|
|
})
|