about summary refs log blame commit diff
path: root/users/wpcarro/emacs/pkgs/math/default.nix
blob: 9167d61d4edccd5dbd48bdd0b2d5adea7adf5924 (plain) (tree)





























                                                                          
{ pkgs, depot, ... }:

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

  emacs = (pkgs.emacsPackagesFor pkgs.emacs28).emacsWithPackages (epkgs: [
    math
  ]);
in
math.overrideAttrs (_old: {
  doCheck = true;
  checkPhase = ''
    ${emacs}/bin/emacs -batch \
      -l ert -l ${./tests.el} -f ert-run-tests-batch-and-exit
  '';
})