about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/editors/emacs/elisp-packages/manual-packages/cask/default.nix
blob: 3ab796bcbd19605538845c400d49088178d00072 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{ lib
, stdenv
, fetchFromGitHub
, bash
, emacs
, python3
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "cask";
  version = "0.8.8";

  src = fetchFromGitHub {
    owner = "cask";
    repo = "cask";
    rev = "v${finalAttrs.version}";
    hash = "sha256-TlReq5sLVJj+pXmJSnepKQkNEWVhnh30iq4egM1HJMU=";
  };

  doCheck = true;

  nativeBuildInputs = [ emacs ];
  buildInputs = [
    bash
    python3
  ]
  ++ (with emacs.pkgs; [
    ansi
    dash
    ecukes
    el-mock
    ert-async
    ert-runner
    f
    git
    noflet
    package-build
    s
    servant
    shell-split-string
  ]);

  strictDeps = true;

  buildPhase = ''
    runHook preBuild

    emacs --batch -L . -f batch-byte-compile cask.el cask-cli.el

    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall

    mkdir -p $out/bin
    install -Dm444 -t $out/share/emacs/site-lisp/cask *.el *.elc
    install -Dm555 -t $out/share/emacs/site-lisp/cask/bin bin/cask
    ln -s $out/share/emacs/site-lisp/cask/bin/cask $out/bin/cask

    runHook postInstall
  '';

  meta = with lib; {
    description = "Project management for Emacs";
    mainProgram = "cask";
    longDescription = ''
      Cask is a project management tool for Emacs that helps automate the
      package development cycle; development, dependencies, testing, building,
      packaging and more.
    '';
    homepage = "https://cask.readthedocs.io/en/latest/index.html";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ AndersonTorres ];
    inherit (emacs.meta) platforms;
  };
})