Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aicommit2: init at 2.1.5 #329349

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions pkgs/by-name/ai/aicommit2/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
nodejs,
pnpm,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most likely you need to change pnpm to pnpm_9. Since #371832, it points to pnpm_10 instead of pnpm_9.

}:

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=";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
hash = "sha256-y3IftcRhsDDyMZ2AE07WyY94mp0j6M6UVno7Qp8d/G8=";
hash = "sha256-GaNNw+qxB493kUo6wfltBvaL67qKCHZw7vLPv9MjnPw=";

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And please rebase to master
#329349 (comment)

};

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
ByteSudoer marked this conversation as resolved.
Show resolved Hide resolved

ln -s $out/lib/aicommit2/dist/cli.mjs $out/bin/aicommit2
ln -s $out/lib/aicommit2/dist/cli.mjs $out/bin/aic2

runHook postInstall
'';

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;
};
})