diff options
Diffstat (limited to 'pkgs/applications/editors/emacs')
5 files changed, 200 insertions, 5 deletions
diff --git a/pkgs/applications/editors/emacs/elisp-packages/manual-packages.nix b/pkgs/applications/editors/emacs/elisp-packages/manual-packages.nix index 22f60c8fd88ad..b58465e20ec33 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/manual-packages.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/manual-packages.nix @@ -1,6 +1,13 @@ { lib, pkgs }: -self: with self; { +self: +let + inherit (self) callPackage; +in +{ + acm = callPackage ./manual-packages/acm { }; + + acm-terminal = callPackage ./manual-packages/acm-terminal { }; agda-input = callPackage ./manual-packages/agda-input { }; @@ -46,6 +53,10 @@ self: with self; { llvm-mode = callPackage ./manual-packages/llvm-mode { }; + lsp-bridge = callPackage ./manual-packages/lsp-bridge { + inherit (pkgs) python3 git go gopls pyright; + }; + matrix-client = callPackage ./manual-packages/matrix-client { _map = self.map; }; @@ -86,8 +97,8 @@ self: with self; { sunrise-commander = callPackage ./manual-packages/sunrise-commander { }; # camelCase aliases for some of the kebab-case expressions above - colorThemeSolarized = color-theme-solarized; - emacsSessionManagement = session-management-for-emacs; - rectMark = rect-mark; - sunriseCommander = sunrise-commander; + colorThemeSolarized = self.color-theme-solarized; + emacsSessionManagement = self.session-management-for-emacs; + rectMark = self.rect-mark; + sunriseCommander = self.sunrise-commander; } diff --git a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/acm-terminal/default.nix b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/acm-terminal/default.nix new file mode 100644 index 0000000000000..8aadb0867c321 --- /dev/null +++ b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/acm-terminal/default.nix @@ -0,0 +1,43 @@ +{ lib +, melpaBuild +, fetchFromGitHub +, acm +, popon +, writeText +, unstableGitUpdater +}: + +let + rev = "321e05fc0398a6159925b858f46608ea07ef269e"; +in +melpaBuild { + pname = "acm-terminal"; + version = "20230215.414"; # 4:14 UTC + + src = fetchFromGitHub { + owner = "twlz0ne"; + repo = "acm-terminal"; + inherit rev; + sha256 = "sha256-Flw07EwH9z0E3tqXs4mStICJmoHfp60ALrP1GmUmeuU="; + }; + + commit = rev; + + packageRequires = [ + acm + popon + ]; + + recipe = writeText "recipe" '' + (acm-terminal :repo "twlz0ne/acm-terminal" :fetcher github) + ''; + + passthru.updateScript = unstableGitUpdater { }; + + meta = with lib; { + description = "Patch for LSP bridge acm on Terminal"; + homepage = "https://github.com/twlz0ne/acm-terminal"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ kira-bruneau ]; + }; +} diff --git a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/acm/default.nix b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/acm/default.nix new file mode 100644 index 0000000000000..5879865c901e2 --- /dev/null +++ b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/acm/default.nix @@ -0,0 +1,32 @@ +{ lib +, melpaBuild +, lsp-bridge +, yasnippet +, writeText +}: + +melpaBuild { + pname = "acm"; + version = lsp-bridge.version; + + src = lsp-bridge.src; + commit = lsp-bridge.src.rev; + + packageRequires = [ + yasnippet + ]; + + recipe = writeText "recipe" '' + (acm + :repo "manateelazycat/lsp-bridge" + :fetcher github + :files ("acm/*.el" "acm/icons")) + ''; + + meta = with lib; { + description = "Asynchronous Completion Menu"; + homepage = "https://github.com/manateelazycat/lsp-bridge"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ fxttr kira-bruneau ]; + }; +} diff --git a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix new file mode 100644 index 0000000000000..bdfe1ed2c8099 --- /dev/null +++ b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix @@ -0,0 +1,97 @@ +{ lib +, python3 +, melpaBuild +, fetchFromGitHub +, substituteAll +, acm +, markdown-mode +, posframe +, git +, go +, gopls +, pyright +, tempel +, writeText +, unstableGitUpdater +}: + +let + rev = "c5dc02f6bd47039c320083b3befac0e569c0efa4"; + python = python3.withPackages (ps: with ps; [ + epc + orjson + sexpdata + six + ]); +in +melpaBuild { + pname = "lsp-bridge"; + version = "20230311.1648"; # 16:48 UTC + + src = fetchFromGitHub { + owner = "manateelazycat"; + repo = "lsp-bridge"; + inherit rev; + sha256 = "sha256-vbSVGPFBjAp4VRbJc6a2W0d2IqOusNa+rk4X6jRcjRI="; + }; + + commit = rev; + + # Hardcode the python dependencies needed for lsp-bridge, so users + # don't have to modify their global environment + postPatch = '' + substituteInPlace lsp-bridge.el --replace \ + '(defcustom lsp-bridge-python-command (if (memq system-type '"'"'(cygwin windows-nt ms-dos)) "python.exe" "python3")' \ + '(defcustom lsp-bridge-python-command "${python.interpreter}"' + ''; + + packageRequires = [ + acm + markdown-mode + posframe + ]; + + buildInputs = [ python ]; + + checkInputs = [ + git + go + gopls + pyright + tempel + ]; + + recipe = writeText "recipe" '' + (lsp-bridge + :repo "manateelazycat/lsp-bridge" + :fetcher github + :files + ("*.el" + "lsp_bridge.py" + "core" + "langserver" + "multiserver" + "resources")) + ''; + + doCheck = true; + checkPhase = '' + runHook preCheck + + cd "$sourceRoot" + mkfifo test.log + cat < test.log & + HOME=$(mktemp -d) python -m test.test + + runHook postCheck + ''; + + passthru.updateScript = unstableGitUpdater { }; + + meta = with lib; { + description = "A blazingly fast LSP client for Emacs"; + homepage = "https://github.com/manateelazycat/lsp-bridge"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ fxttr kira-bruneau ]; + }; +} diff --git a/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix b/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix index 7fbf06b9d114c..33d489b60aba7 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix @@ -425,6 +425,18 @@ let rtags-xref = dontConfigure super.rtags; + rime = super.rime.overrideAttrs (old: { + buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.librime ]; + preBuild = (old.preBuild or "") + '' + make lib + mkdir -p /build/rime-lib + cp *.so /build/rime-lib + ''; + postInstall = (old.postInstall or "") + '' + install -m444 -t $out/share/emacs/site-lisp/elpa/rime-* /build/rime-lib/*.so + ''; + }); + shm = super.shm.overrideAttrs (attrs: { propagatedUserEnvPkgs = [ pkgs.haskellPackages.structured-haskell-mode ]; }); |