2022-10-28 21:29:30 +03:00
|
|
|
{ pkgs, idris-emacs-src, idris2Pkg }:
|
|
|
|
with pkgs;
|
2021-03-15 17:21:50 +03:00
|
|
|
let
|
|
|
|
init-file = ./init.el;
|
2022-10-28 21:29:30 +03:00
|
|
|
makeEmacsWrapper = name: my-emacs: init:
|
|
|
|
writeShellScriptBin name ''
|
|
|
|
${my-emacs}/bin/emacs -q -l ${init-file} $@
|
|
|
|
'';
|
2021-03-15 17:21:50 +03:00
|
|
|
in rec {
|
2023-01-23 10:38:16 +03:00
|
|
|
idris2-mode = emacsPackages.trivialBuild {
|
2021-03-15 17:21:50 +03:00
|
|
|
pname = "idris2-mode";
|
|
|
|
src = idris-emacs-src;
|
2022-10-28 21:29:30 +03:00
|
|
|
packageRequires = with pkgs.emacsPackages.melpaPackages; [ prop-menu ];
|
2021-03-15 17:21:50 +03:00
|
|
|
version = "1";
|
|
|
|
recipe = pkgs.writeText "recipe" ''
|
|
|
|
(idris2-mode :repo "redfish64/idris2-mode" :fetcher github)
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
idris-emacs = emacsWithPackages [ idris2-mode ];
|
|
|
|
emacs-dev = makeEmacsWrapper "emacs-dev" idris-emacs init-file;
|
|
|
|
emacs-with-idris = writeShellScriptBin "emacs-with-idris" ''
|
|
|
|
export PATH=${idris2Pkg}/bin:$PATH
|
|
|
|
${emacs-dev}/bin/emacs-dev $@
|
|
|
|
'';
|
|
|
|
}
|