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";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "5.6.0";
|
2022-01-07 04:07:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "oknozor";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-10-09 19:29:22 +00:00
|
|
|
sha256 = "sha256-dOiXrHD1ZVhMQNwo7hD/f53Ct5+Lwxq/zbApll5O2qo=";
|
2022-01-07 04:07:37 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
cargoHash = "sha256-oO7xqjxlQg0s40WmWNZpEpqdRia4NGGlYbBO8ejW9BE=";
|
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
|
|
|
};
|
|
|
|
}
|