Skip to content

Commit

Permalink
aicommit2: init at 2.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
ByteSudoer committed Oct 20, 2024
1 parent 1fd7cd8 commit e3903c1
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions pkgs/by-name/ai/aicommit2/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
nodejs,
pnpm,
}:

stdenvNoCC.mkDerivation (finalAttrs: {
pname = "aicommit2";
version = "2.1.5";

src = fetchFromGitHub {
owner = "tak-bro";
repo = "aicommit2";
rev = "v${finalAttrs.version}";
hash = "sha256-/bl0Qo4y3rDdGXIKTdjC5wtbeW1NUaIMkw5uzSQ+8Dk=";
};

pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs) pname version src;
hash = "sha256-y3IftcRhsDDyMZ2AE07WyY94mp0j6M6UVno7Qp8d/G8=";
};

nativeBuildInputs = [
nodejs
pnpm.configHook
];
buildInputs = [ nodejs ];

buildPhase = ''
runHook preBuild
pnpm build
runHook postBuild
'';

installPhase = ''
runHook preInstall
mkdir -p $out/{bin,lib/aicommit2}
cp -r {dist,node_modules} $out/lib/aicommit2
runHook postInstall
'';

preFixup = ''
patchShebangs $out/lib/aicommit2/dist/cli.mjs
ln -s $out/lib/aicommit2/dist/cli.mjs $out/bin/aicommit2
ln -s $out/lib/aicommit2/dist/cli.mjs $out/bin/aic2
'';
meta = {
description = "Reactive CLI that generates git commit messages with AI";
homepage = "https://github.com/tak-bro/aicommit2";
changelog = "https://github.com/tak-bro/aicommit2/blob/${finalAttrs.src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ByteSudoer ];
mainProgram = "aicommit2";
platforms = lib.platforms.all;
};
})

0 comments on commit e3903c1

Please sign in to comment.