nixpkgs/pkgs/development/tools/cocogitto/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1.2 KiB
Nix
Raw Normal View History

2022-09-16 19:54:42 +02:00
{ lib, rustPlatform, fetchFromGitHub, installShellFiles, stdenv, Security, makeWrapper, libgit2 }:
2021-12-17 22:20:18 +01:00
rustPlatform.buildRustPackage rec {
pname = "cocogitto";
2022-09-11 17:14:53 +02:00
version = "5.2.0";
2021-12-17 22:20:18 +01:00
src = fetchFromGitHub {
owner = "oknozor";
repo = pname;
rev = version;
2022-09-11 17:14:53 +02:00
sha256 = "sha256-ZjDZMI84z8riRtidZVeCktwJUMkZU28E23MveJSD7xY=";
2021-12-17 22:20:18 +01:00
};
2022-09-11 17:14:53 +02:00
cargoSha256 = "sha256-oaWWAVTKxrshfvqE+HMQ1WeeEz8lOE7qc6RrgSjDtdU=";
2021-12-17 22:20:18 +01: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;
2022-09-16 19:54:42 +02:00
nativeBuildInputs = [ installShellFiles ];
2021-12-17 22:20:18 +01:00
2022-09-16 19:54:42 +02:00
buildInputs = [ libgit2 ] ++ lib.optional stdenv.isDarwin Security;
2021-12-17 22:20:18 +01: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;
maintainers = with maintainers; [ travisdavis-ops ];
};
}