mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-28 11:05:17 +03:00
29 lines
796 B
Nix
29 lines
796 B
Nix
{ pkgs
|
|
, idris-emacs-src
|
|
, idris2Pkg
|
|
}: with pkgs;
|
|
let
|
|
init-file = ./init.el;
|
|
makeEmacsWrapper = name: my-emacs: init: writeShellScriptBin name ''
|
|
${my-emacs}/bin/emacs -q -l ${init-file} $@
|
|
'';
|
|
in rec {
|
|
idris2-mode = emacsPackages.melpaBuild {
|
|
pname = "idris2-mode";
|
|
src = idris-emacs-src;
|
|
packageRequires = with pkgs.emacsPackages.melpaPackages; [
|
|
prop-menu
|
|
];
|
|
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 $@
|
|
'';
|
|
}
|