fedora-csb-system-manager
 1# https://github.com/chmouel/chmouzies/tree/master/kubernetes
 2{
 3  stdenv,
 4  lib,
 5  fetchFromGitLab,
 6  python313,
 7  installShellFiles,
 8}:
 9
10stdenv.mkDerivation {
11  pname = "chmouzies-ai";
12  version = "0-unstable-2025-09-30";
13
14  src = fetchFromGitLab {
15    owner = "chmouel";
16    repo = "chmouzies";
17    rev = "10773a982503829e5f276a3bd8fd526dab4f92d3";
18    hash = "sha256-Lr4tYzgEhvVhJhSRDGuUlrp7XP2iUNX7H2nizlEko3Q=";
19  };
20
21  propagatedBuildInputs = [ python313 ];
22  nativeBuildInputs = [ installShellFiles ];
23
24  installPhase =
25    let
26      binaries = [
27        "aicommit"
28        "git-commit-suggest-label"
29      ];
30    in
31    ''
32      runHook preInstall
33
34      mkdir -p $out/bin
35      ${lib.concatMapStringsSep "\n" (b: "cp $src/ai/${b} $out/bin/") binaries}
36
37      installShellCompletion --cmd aicommit --zsh $src/ai/_aicommit
38
39      runHook postInstall
40    '';
41
42  meta = {
43    description = "Chmouel's AI-assisted git tools";
44    homepage = "https://gitlab.com/chmouel/chmouzies";
45    platforms = lib.platforms.unix;
46  };
47}