aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/applications/version-management/git-and-tools/stgit/default.nix
blob: 1bad72296b4f7fc03aa4d717698968818fdf2671 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ stdenv, python3Packages, fetchFromGitHub, git, installShellFiles }:

python3Packages.buildPythonApplication rec {
  pname = "stgit";
  version = "0.23";

  src = fetchFromGitHub {
    owner = "ctmarinas";
    repo = "stgit";
    rev = "v${version}";
    sha256 = "1r9y8qnl6kdvq61788pnfhhgyv2xrnyrizbhy4qz4l1bpqkwfr2r";
  };

  nativeBuildInputs = [ installShellFiles ];

  checkInputs = [ git ];

  postInstall = ''
    installShellCompletion $out/share/stgit/completion/stg.fish
    installShellCompletion --name stg $out/share/stgit/completion/stgit.bash
    installShellCompletion --name _stg $out/share/stgit/completion/stgit.zsh
  '';

  meta = with stdenv.lib; {
    description = "A patch manager implemented on top of Git";
    homepage = "http://procode.org/stgit/";
    license = licenses.gpl2;
    platforms = platforms.unix;
  };
}