main
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-git";
12 version = "0-unstable-2026-04-14";
13
14 src = fetchFromGitLab {
15 owner = "chmouel";
16 repo = "chmouzies";
17 rev = "99b02ddf55c76b667e670e63e9ea303986d49cc7";
18 hash = "sha256-hXjAkF0JmrVr0GoCj07eFiSMKVnC0+PpKTcyx6IwNmk=";
19 };
20
21 propagatedBuildInputs = [ python313 ];
22 nativeBuildInputs = [ installShellFiles ];
23
24 installPhase =
25 let
26 binaries = [
27 "gh-actionfollow"
28 "gh-attach-pr"
29 "gh-checks"
30 "gh-clone"
31 "gh-completer"
32 "gh-issuecreate"
33 "gh-issuef"
34 "gh-push-other"
35 "git-branch-cleanup"
36 "git-browse"
37 "git-bumpt"
38 "git-create-branch"
39 "git-remote-branch"
40 "git-spinoff"
41 ];
42 in
43 ''
44 runHook preInstall
45
46 mkdir -p $out/bin
47 ${lib.concatMapStringsSep "\n" (b: "cp $src/git/${b} $out/bin/") binaries}
48
49 installShellCompletion --cmd gh-issuecreate --zsh $src/git/_gh-issuecreate
50 installShellCompletion --cmd gh-clone --zsh $src/git/_gh-clone
51 installShellCompletion --cmd git-branch-switch --zsh $src/git/_git-branch-switch
52 installShellCompletion --cmd git-branch-list --zsh $src/git/_git-branch-list
53
54 runHook postInstall
55 '';
56
57 meta = with lib; {
58 description = "Chmouel's git-related helper scripts and GitHub CLI extensions";
59 homepage = "https://gitlab.com/chmouel/chmouzies";
60 platforms = platforms.unix;
61 };
62}