2022-09-16 17:54:42 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, installShellFiles, stdenv, Security, makeWrapper, libgit2 }:
|
2021-12-17 21:20:18 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cocogitto";
|
2023-12-01 16:03:33 +00:00
|
|
|
version = "6.0.1";
|
2021-12-17 21:20:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "oknozor";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-12-01 16:03:33 +00:00
|
|
|
sha256 = "sha256-iJH2uXlKsq7I94D3/Fe3pB8SzPfO0CodEk3XNdGleMk=";
|
2021-12-17 21:20:18 +00:00
|
|
|
};
|
|
|
|
|
2023-12-01 16:03:33 +00:00
|
|
|
cargoHash = "sha256-srcAUrPrrZoNUn7OeyzSRpOiEuyEizxTiEUbaNg9llE=";
|
2021-12-17 21:20:18 +00:00
|
|
|
|
2023-05-08 15:55:34 +00:00
|
|
|
# Test depend on git configuration that would likely exist in a normal user environment
|
2021-12-17 21:20:18 +00:00
|
|
|
# and might be failing to create the test repository it works in.
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-09-16 17:54:42 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2021-12-17 21:20:18 +00:00
|
|
|
|
2022-09-16 17:54:42 +00:00
|
|
|
buildInputs = [ libgit2 ] ++ lib.optional stdenv.isDarwin Security;
|
2021-12-17 21:20:18 +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-09 13:15:55 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2021-12-17 21:20:18 +00:00
|
|
|
};
|
|
|
|
}
|