cocogitto: refactor to use libgit2

This commit is contained in:
Joshua Gilman 2022-09-16 10:54:42 -07:00
parent ee3472f720
commit 22bb5607ed
No known key found for this signature in database
GPG Key ID: 5615DDABF6425880

View File

@ -1,4 +1,4 @@
{ lib, rustPlatform, fetchFromGitHub, installShellFiles, stdenv, Security, makeWrapper, git }:
{ lib, rustPlatform, fetchFromGitHub, installShellFiles, stdenv, Security, makeWrapper, libgit2 }:
rustPlatform.buildRustPackage rec {
pname = "cocogitto";
@ -17,18 +17,15 @@ rustPlatform.buildRustPackage rec {
# and might be failing to create the test repository it works in.
doCheck = false;
nativeBuildInputs = [ installShellFiles makeWrapper ];
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optional stdenv.isDarwin Security;
buildInputs = [ libgit2 ] ++ 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; {