2024-11-10 05:49:09 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, installShellFiles, stdenv, libgit2 }:
|
2021-12-17 21:20:18 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cocogitto";
|
2024-03-14 12:19:36 +00:00
|
|
|
version = "6.1.0";
|
2021-12-17 21:20:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "oknozor";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-11-10 05:49:09 +00:00
|
|
|
hash = "sha256-yGwGWXME9ZjFJk/3pVDRTa1phG6kd8+YhXe/MxOEdF0=";
|
2021-12-17 21:20:18 +00:00
|
|
|
};
|
|
|
|
|
2024-03-14 12:19:36 +00:00
|
|
|
cargoHash = "sha256-iS/nRfy63bgo7MeL/5jJ3Vn6S7dG49erIZ+0516YxKM=";
|
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
|
|
|
|
2024-11-10 05:49:09 +00:00
|
|
|
buildInputs = [ libgit2 ];
|
2021-12-17 21:20:18 +00:00
|
|
|
|
2024-07-10 11:52:28 +00:00
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
2021-12-17 21:20:18 +00:00
|
|
|
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 = "Set of cli tools for the conventional commit and semver specifications";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "cog";
|
2021-12-17 21:20:18 +00:00
|
|
|
homepage = "https://github.com/oknozor/cocogitto";
|
|
|
|
license = licenses.mit;
|
2024-07-28 14:44:11 +00:00
|
|
|
maintainers = [ ];
|
2021-12-17 21:20:18 +00:00
|
|
|
};
|
|
|
|
}
|