2021-08-19 16:19:21 +02:00
|
|
|
{ depot, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
2022-08-30 15:22:17 +02:00
|
|
|
# emacsPgtkNativeComp is defined in emacs-overlay
|
|
|
|
emacs = (pkgs.emacsPackagesFor pkgs.emacsPgtkNativeComp).withPackages (epkgs: [
|
2022-09-17 20:36:24 +02:00
|
|
|
epkgs.bqn-mode
|
2022-05-22 13:33:17 +02:00
|
|
|
#epkgs.elpaPackages.ada-mode
|
2022-05-09 15:11:04 +02:00
|
|
|
epkgs.elpaPackages.rainbow-mode
|
|
|
|
epkgs.elpaPackages.undo-tree
|
2022-05-25 09:24:46 +02:00
|
|
|
epkgs.elpaPackages.which-key
|
2021-08-19 16:19:21 +02:00
|
|
|
epkgs.melpaPackages.adoc-mode
|
2022-05-09 15:37:24 +02:00
|
|
|
epkgs.melpaPackages.cmake-mode
|
2022-03-12 13:33:55 +01:00
|
|
|
epkgs.melpaPackages.direnv
|
2021-08-19 16:19:21 +02:00
|
|
|
epkgs.melpaPackages.dockerfile-mode
|
2022-05-12 18:33:50 +02:00
|
|
|
epkgs.melpaPackages.editorconfig
|
2022-05-09 15:11:04 +02:00
|
|
|
epkgs.melpaPackages.elfeed
|
|
|
|
epkgs.melpaPackages.evil
|
|
|
|
epkgs.melpaPackages.evil-collection
|
2021-08-19 16:19:21 +02:00
|
|
|
epkgs.melpaPackages.haskell-mode
|
2022-05-09 15:11:04 +02:00
|
|
|
epkgs.melpaPackages.hl-todo
|
2021-10-11 15:02:19 +02:00
|
|
|
epkgs.melpaPackages.jq-mode
|
2022-01-11 00:21:21 +01:00
|
|
|
epkgs.melpaPackages.languagetool
|
2022-03-12 13:33:55 +01:00
|
|
|
epkgs.melpaPackages.lsp-haskell
|
2022-05-09 15:11:04 +02:00
|
|
|
epkgs.melpaPackages.lsp-mode
|
2022-05-26 13:42:52 +02:00
|
|
|
epkgs.melpaPackages.lsp-ui
|
2022-05-09 15:11:04 +02:00
|
|
|
epkgs.melpaPackages.magit
|
2021-08-19 16:19:21 +02:00
|
|
|
epkgs.melpaPackages.markdown-mode
|
2022-05-02 23:12:49 +02:00
|
|
|
epkgs.melpaPackages.meson-mode
|
2021-08-19 16:19:21 +02:00
|
|
|
epkgs.melpaPackages.nix-mode
|
2022-05-11 19:35:37 +02:00
|
|
|
epkgs.melpaPackages.org-clock-csv
|
2022-05-09 15:11:04 +02:00
|
|
|
epkgs.melpaPackages.paredit
|
|
|
|
epkgs.melpaPackages.rainbow-delimiters
|
2021-08-19 16:19:21 +02:00
|
|
|
epkgs.melpaPackages.sly
|
2022-05-09 15:11:04 +02:00
|
|
|
epkgs.melpaPackages.use-package
|
2021-08-19 16:19:21 +02:00
|
|
|
epkgs.melpaPackages.yaml-mode
|
2021-09-14 23:38:42 +02:00
|
|
|
epkgs.rust-mode
|
2021-08-19 16:19:21 +02:00
|
|
|
epkgs.tvlPackages.tvl
|
2022-05-09 15:11:04 +02:00
|
|
|
epkgs.urweb-mode
|
2022-05-25 22:13:07 +02:00
|
|
|
|
|
|
|
# TODO(sterni): until org-tracker is part of depot
|
|
|
|
epkgs.ivy
|
|
|
|
epkgs.dash
|
|
|
|
epkgs.s
|
|
|
|
epkgs.jiralib2
|
2021-08-19 16:19:21 +02:00
|
|
|
]);
|
2021-12-14 15:36:20 +01:00
|
|
|
|
|
|
|
configDirectory = pkgs.symlinkJoin {
|
|
|
|
name = "emacs.d";
|
|
|
|
paths = [
|
|
|
|
./.
|
|
|
|
(pkgs.writeTextFile {
|
|
|
|
name = "injected-emacs.d";
|
|
|
|
destination = "/nix-inject.el";
|
|
|
|
text = ''
|
2022-01-11 00:21:21 +01:00
|
|
|
;; bqn-mode
|
2021-12-14 15:36:20 +01:00
|
|
|
(setq bqn-interpreter-path "${pkgs.cbqn}/bin/BQN")
|
|
|
|
|
2022-01-11 00:21:21 +01:00
|
|
|
;; languagetool
|
2022-03-06 23:48:51 +01:00
|
|
|
(setq languagetool-java-bin "${pkgs.jre}/bin/java"
|
|
|
|
languagetool-console-command "${pkgs.languagetool}/share/languagetool-commandline.jar"
|
2022-05-25 21:04:59 +02:00
|
|
|
languagetool-server-command "${pkgs.languagetool}/share/languagetool-server.jar")
|
2022-01-11 00:21:21 +01:00
|
|
|
|
2022-05-10 16:13:22 +02:00
|
|
|
;; use bash instead of fish from SHELL for some things, as it plays
|
|
|
|
;; nicer with TERM=dumb, as I don't need/want vterm anyways.
|
|
|
|
;; We want it to source /etc/profile for some extra setup that
|
|
|
|
;; kicks in if TERM=dumb, meaning we can't use dash/sh mode.
|
|
|
|
(setq shell-file-name "${pkgs.bash}/bin/bash"
|
|
|
|
explicit-bash-args '("-l"))
|
|
|
|
|
2021-12-14 15:36:20 +01:00
|
|
|
(provide 'nix-inject)
|
|
|
|
'';
|
|
|
|
})
|
|
|
|
];
|
|
|
|
postBuild = ''
|
|
|
|
rm "$out/default.nix"
|
|
|
|
'';
|
|
|
|
};
|
2021-08-19 16:19:21 +02:00
|
|
|
in
|
|
|
|
|
|
|
|
# sadly we can't give an init-file via the command line
|
2022-03-24 11:27:21 +01:00
|
|
|
(pkgs.writeShellScriptBin "emacs" ''
|
2021-12-14 15:36:20 +01:00
|
|
|
exec ${emacs}/bin/emacs \
|
|
|
|
--no-init-file \
|
|
|
|
--directory ${configDirectory} \
|
|
|
|
--eval "(require 'init)" \
|
2021-08-19 16:19:21 +02:00
|
|
|
"$@"
|
2022-03-24 11:27:21 +01:00
|
|
|
'').overrideAttrs (super: {
|
|
|
|
buildCommand = ''
|
|
|
|
${super.buildCommand}
|
|
|
|
|
|
|
|
ln -s "${emacs}/bin/emacsclient" "$out/bin/emacsclient"
|
|
|
|
'';
|
|
|
|
})
|