about summary refs log tree commit diff
path: root/pkgs/applications/editors/emacs-modes/magit/default.nix
blob: b5f4ac506cc4c28f677f5fcf02da4ef81bebf914 (plain) (blame)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{ stdenv, fetchFromGitHub, emacs, texinfo, gitModes, git, dash }:

let
  version = "2.3.0";
in
stdenv.mkDerivation {
  name = "magit-${version}";

  src = fetchFromGitHub {
    owner = "magit";
    repo = "magit";
    rev = version;
    sha256 = "1zbx1ky1481lkvfjr4k23q7jdrk9ji9v5ghj88qib36vbmzfwww8";
  };

  buildInputs = [ emacs texinfo git ];
  propagatedUserEnvPkgs = [ gitModes dash ];

  configurePhase = ''
    makeFlagsArray=(
      PREFIX="$out"
      lispdir="$out/share/emacs/site-lisp"
      DASH_DIR="${dash}/share/emacs/site-lisp"
      VERSION="${version}"
    )
    make ''${makeFlagsArray[@]} -C lisp magit-version.el
    cp lisp/magit-version.el Documentation/
    cp lisp/magit-version.el .
  '';

  doCheck = false;  # 2 out of 15 tests fails, not sure why
  checkTarget = "test";
  preCheck = "export EMAIL='Joe Doe <joe.doe@example.org>'";

  meta = {
    homepage = "https://github.com/magit/magit";
    description = "Magit, an Emacs interface to Git";
    license = stdenv.lib.licenses.gpl3Plus;

    longDescription = ''
      With Magit, you can inspect and modify your Git repositories with
      Emacs. You can review and commit the changes you have made to the
      tracked files, for example, and you can browse the history of past
      changes. There is support for cherry picking, reverting, merging,
      rebasing, and other common Git operations.

      Magit is not a complete interface to Git; it just aims to make the
      most common Git operations convenient. Thus, Magit will likely not
      save you from learning Git itself.
    '';

    maintainers = with stdenv.lib.maintainers; [ simons ];
  };
}