1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 python3,
6}:
7
8stdenv.mkDerivation rec {
9 pname = "git-when-merged";
10 version = "1.2.1";
11
12 src = fetchFromGitHub {
13 owner = "mhagger";
14 repo = "git-when-merged";
15 rev = "v${version}";
16 sha256 = "sha256-Yp/GNzD+7EPlk/kzZnT1eiSNsSxpYEiZezRbUU3HfLc=";
17 };
18
19 buildInputs = [ python3 ];
20
21 installPhase = ''
22 install -D --target-directory $out/bin/ bin/git-when-merged
23 '';
24
25 meta = with lib; {
26 description = "Helps you figure out when and why a commit was merged into a branch";
27 longDescription = ''
28 If you use standard Git workflows, then you create a feature
29 branch for each feature that you are working on. When the feature
30 is complete, you merge it into your master branch. You might even
31 have sub-feature branches that are merged into a feature branch
32 before the latter is merged.
33
34 In such a workflow, the first-parent history of master consists
35 mainly of merges of feature branches into the mainline. git
36 when-merged can be used to ask, "When (and why) was commit C
37 merged into the current branch?"
38 '';
39 homepage = "https://github.com/mhagger/git-when-merged";
40 license = licenses.gpl2Only;
41 platforms = python3.meta.platforms;
42 maintainers = with maintainers; [ DamienCassou ];
43 mainProgram = "git-when-merged";
44 };
45}