2022-10-30 15:09:59 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, installShellFiles, stdenv, Security, makeWrapper, libgit2 }:
|
2022-01-07 04:07:37 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cocogitto";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "6.0.1";
|
2022-01-07 04:07:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "oknozor";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-01-02 11:29:13 +00:00
|
|
|
sha256 = "sha256-iJH2uXlKsq7I94D3/Fe3pB8SzPfO0CodEk3XNdGleMk=";
|
2022-01-07 04:07:37 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
cargoHash = "sha256-srcAUrPrrZoNUn7OeyzSRpOiEuyEizxTiEUbaNg9llE=";
|
2022-01-07 04:07:37 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
# Test depend on git configuration that would likely exist in a normal user environment
|
2022-01-07 04:07:37 +00:00
|
|
|
# and might be failing to create the test repository it works in.
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2022-01-07 04:07:37 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
buildInputs = [ libgit2 ] ++ lib.optional stdenv.isDarwin Security;
|
2022-01-07 04:07:37 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
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 = with lib; {
|
|
|
|
description = "A set of cli tools for the conventional commit and semver specifications";
|
|
|
|
homepage = "https://github.com/oknozor/cocogitto";
|
|
|
|
license = licenses.mit;
|
2023-10-19 13:55:26 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2022-01-07 04:07:37 +00:00
|
|
|
};
|
|
|
|
}
|