about summary refs log tree commit diff
path: root/users/wpcarro/emacs/pkgs/cycle/default.nix
blob: 7ef3b431ada68c66622c1bc42f7bc7f40215bfdf (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
{ pkgs, depot, ... }:

let
  cycle = pkgs.callPackage
    ({ emacsPackages }:
      emacsPackages.trivialBuild {
        pname = "cycle";
        version = "1.0.0";
        src = ./cycle.el;
        packageRequires =
          (with emacsPackages; [
            dash
          ]) ++
          (with depot.users.wpcarro.emacs.pkgs; [
            struct
          ]);
      })
    { };

  emacs = (pkgs.emacsPackagesFor pkgs.emacs28).emacsWithPackages (epkgs: [
    epkgs.dash
    cycle
  ]);
in
cycle.overrideAttrs (_old: {
  doCheck = true;
  checkPhase = ''
    ${emacs}/bin/emacs -batch \
      -l ert -l ${./tests.el} -f ert-run-tests-batch-and-exit
  '';
  passthru.meta.ci.extraSteps.github = depot.tools.releases.filteredGitPush {
    filter = ":/users/wpcarro/emacs/pkgs/cycle";
    remote = "git@github.com:wpcarro/cycle.el.git";
    ref = "refs/heads/canon";
  };
})