1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 makeWrapper,
6 git,
7 gnused,
8}:
9
10stdenv.mkDerivation rec {
11 pname = "git-reparent";
12 version = "0-unstable-2017-09-03";
13
14 src = fetchFromGitHub {
15 owner = "MarkLodato";
16 repo = "git-reparent";
17 rev = "a99554a32524a86421659d0f61af2a6c784b7715";
18 sha256 = "0v0yxydpw6r4awy0hb7sbnh520zsk86ibzh1xjf3983yhsvkfk5v";
19 };
20
21 nativeBuildInputs = [ makeWrapper ];
22
23 dontBuild = true;
24
25 installPhase = ''
26 install -m755 -Dt $out/bin git-reparent
27 '';
28
29 postFixup = ''
30 wrapProgram $out/bin/git-reparent --prefix PATH : "${
31 lib.makeBinPath [
32 git
33 gnused
34 ]
35 }"
36 '';
37
38 meta = with lib; {
39 inherit (src.meta) homepage;
40 description = "Git command to recommit HEAD with a new set of parents";
41 maintainers = [ ];
42 license = licenses.gpl2;
43 platforms = platforms.unix;
44 mainProgram = "git-reparent";
45 };
46}