nixpkgs/pkgs/applications/version-management/git-and-tools/git-when-merged/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

41 lines
1.3 KiB
Nix

{ lib, stdenv, fetchFromGitHub, python3 }:
stdenv.mkDerivation rec {
pname = "git-when-merged";
version = "1.2.0";
src = fetchFromGitHub {
owner = "mhagger";
repo = pname;
rev = "v${version}";
sha256 = "0sw98gmsnd4iki9fx455jga9m80bxvvfgys8i1r2fc7d5whc2qa6";
};
buildInputs = [ python3 ];
installPhase = ''
install -D --target-directory $out/bin/ bin/git-when-merged
'';
meta = with lib; {
description =
"Helps you figure out when and why a commit was merged into a branch";
longDescription = ''
If you use standard Git workflows, then you create a feature
branch for each feature that you are working on. When the feature
is complete, you merge it into your master branch. You might even
have sub-feature branches that are merged into a feature branch
before the latter is merged.
In such a workflow, the first-parent history of master consists
mainly of merges of feature branches into the mainline. git
when-merged can be used to ask, "When (and why) was commit C
merged into the current branch?"
'';
homepage = "https://github.com/mhagger/git-when-merged";
license = licenses.gpl2Only;
platforms = python3.meta.platforms;
maintainers = with maintainers; [ DamienCassou ];
};
}