2022-01-07 04:07:37 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, installShellFiles, stdenv, Security, makeWrapper, git }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cocogitto";
|
2022-09-14 18:05:37 +00:00
|
|
|
version = "5.2.0";
|
2022-01-07 04:07:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "oknozor";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-09-14 18:05:37 +00:00
|
|
|
sha256 = "sha256-ZjDZMI84z8riRtidZVeCktwJUMkZU28E23MveJSD7xY=";
|
2022-01-07 04:07:37 +00:00
|
|
|
};
|
|
|
|
|
2022-09-14 18:05:37 +00:00
|
|
|
cargoSha256 = "sha256-oaWWAVTKxrshfvqE+HMQ1WeeEz8lOE7qc6RrgSjDtdU=";
|
2022-01-07 04:07:37 +00:00
|
|
|
|
|
|
|
# Test depend on git configuration that would likly exist in a normal user enviroment
|
|
|
|
# and might be failing to create the test repository it works in.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
|
|
|
|
|
|
|
buildInputs = lib.optional stdenv.isDarwin Security;
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
wrapProgram $out/bin/cog \
|
|
|
|
--prefix PATH : "${lib.makeBinPath [ git ]}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
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;
|
|
|
|
maintainers = with maintainers; [ travisdavis-ops ];
|
|
|
|
};
|
|
|
|
}
|