about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2018-07-29T14·56+0200
committerVincent Ambo <tazjin@gmail.com>2018-07-29T14·56+0200
commita25485fad44228e0815f8361319a7c092f11d811 (patch)
tree00dc0f8be6ab1d0b4f4b9d1c0402eb38c878f24b
parentb805265c7dd5e52de690c294f8b7008431be9785 (diff)
refactor(emacs): Install eglot & jsonrpc from ELPA instead of Github
trust++;
-rw-r--r--emacs.nix22
1 files changed, 15 insertions, 7 deletions
diff --git a/emacs.nix b/emacs.nix
index 7a16897126fd..cef66240375e 100644
--- a/emacs.nix
+++ b/emacs.nix
@@ -25,18 +25,26 @@ nix-mode = emacsPackagesNg.melpaBuild {
   '';
 };
 
-# The default Rust language server mode is not really usable, install
-# `eglot` instead and hope for the best.
+jsonrpc = emacsPackagesNg.elpaBuild rec {
+  pname   = "jsonrpc";
+  version = "1.0.0";
+
+  src = fetchurl {
+    url    = "https://elpa.gnu.org/packages/jsonrpc-${version}.el";
+    sha256 = "06lmmn7j2ilkvwibbpgnd8p6d63fjjnxd2ma8f4jw6vrz1f7lwvs";
+  };
+};
+
 eglot = emacsPackagesNg.melpaBuild rec {
   pname = "eglot";
   version = "1.1";
 
-  src = fetchFromGitHub {
-    owner  = "joaotavora";
-    repo   = "eglot";
-    rev    = version;
-    sha256 = "0p3fry60xvh7za0p8pyz4h21nzj6df1cbl9lxdzd19rwfd35fzpp";
+  src = fetchurl {
+    url    = "https://elpa.gnu.org/packages/eglot-${version}.tar";
+    sha256 = "01h4wh87lrd9l50y20gjjkgg760v8ixvbcb3q8jykl29989zw62y";
   };
+
+  packageRequires = [ jsonrpc ];
 };
 
 # ivy has not been updated in unstable for a while: