!SlMumQZnFjwLRjWFbW:nixos.org

Nix + Doom Emacs

228 Members
Running Doom Emacs with Nix | You probably want https://github.com/nix-community/nix-doom-emacs48 Servers

Load older messages


SenderMessageTime
3 Sep 2022
@mon:tchncs.deribosomerocker after nix-doom-emacs succeeds building and emacs functions as it normally should, i'll be closing my issue and then i'll try to tackle the documentation issues, and also hopefully providing or maybe even helping in improving some parts of the module 00:09:13
@mon:tchncs.deribosomerocker though, all of the last errors have been very similar to https://paste.rs/Njm, so i'm getting worried there 00:13:08
@mon:tchncs.deribosomerocker I think it builds! 01:16:32
@mon:tchncs.deribosomerockernow, i have to try it with vterm and also emacsPgtkNativeComp01:17:10
@mon:tchncs.deribosomerocker welp, i switched to the build and, well, emacs is there... i just don't see any doomness to it 01:25:08
@mon:tchncs.deribosomerocker that's before i use vterm and emacsPgtkNativeComp 01:25:21
@mon:tchncs.deribosomerocker alright you guys, now after using emacsPgtkNativeComp it also doesn't error, but both with and without it, the doom part of doom emacs doesn't seem set-up :/ 09:52:54
@mon:tchncs.deribosomerockerimage.png
Download image.png
09:53:02
@mon:tchncs.deribosomerocker

currently i get this error:

09:53:02
@mon:tchncs.deribosomerockerimage.png
Download image.png
09:53:20
@mon:tchncs.deribosomerocker and here's how all of my emacs looks for reference 09:53:20
@mon:tchncs.deribosomerocker huh, you guys don't respect DOOMDIR and EMACSDIR? 09:53:57
@k0kada:matrix.orgk0kada (he/him)
In reply to @mon:tchncs.de
huh, you guys don't respect DOOMDIR and EMACSDIR?
We use them to inject the configuration
10:32:59
@k0kada:matrix.orgk0kada (he/him)So please don't set it yourself, otherwise this is not going to work10:33:32
@k0kada:matrix.orgk0kada (he/him)We just allow overwrites of this variables for debugging purposes10:33:42
@mon:tchncs.deribosomerocker yeah alright 10:36:26
@mon:tchncs.deribosomerocker

well, i unset them:

~/.c/nixos:mon% echo $DOOMDIR

~/.c/nixos:mon% echo $EMACSDIR

~/.c/nixos:mon% emacs
10:37:00
@mon:tchncs.deribosomerocker
In reply to@mon:tchncs.de
image.png
but the last command still produces the exact same error up top: this one
10:37:01
@mon:tchncs.deribosomerockerany idea how i can fix it?10:37:07
@mon:tchncs.deribosomerocker (but yeah, see what I mean about it being fragile? haha) 10:37:19
@mon:tchncs.deribosomerocker k0ka: ckie: i just pushed my local changes to my repository's doom branch if you want to look into it 10:50:05
@k0kada:matrix.orgk0kada (he/him)
In reply to @mon:tchncs.de
(but yeah, see what I mean about it being fragile? haha)

I mean, you shouldn't set random environment variables without knowing what they do

I can also break a normal doom-emacs installation setting them

17:40:06
@k0kada:matrix.orgk0kada (he/him)BTW, the alternative of not setting those environment variables would be to do more patching in the source code, that is even more fragile17:40:44
@k0kada:matrix.orgk0kada (he/him)
nix build .#nixosConfigurations.nixos.config.home-manager.users.mon.programs.doom-emacs.package
error: hash mismatch in fixed-output derivation '/nix/store/l5ayjskk8klgdyda9a62a44ngk6x71xg-source.drv':
         specified: sha256-l0cDaMa5qUpIbVT4203tAUA2Ta0O9I15vHSl9fwXKks=
            got:    sha256-TxsGaG2fBRWWP9aas59kiNnUVD4ZdNlwwaFbM4+n81c=
error: 1 dependencies of derivation '/nix/store/jqrsifdklp09mv7f5g0fn7lfs6fr2r7m-emacs-idris2-mode-0.0.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/gdi0zq0w212hgmxnjvi9b4hj4nb9z5bs-install-repo.drv' failed to build
error: 1 dependencies of derivation '/nix/store/a11frw7z2mx9g1s3g792v1wia0znj482-straight-emacs-env.drv' failed to build

Commit 2be2578473e2920dfac7a1d84d41f6ad28d5abcf
error: 1 dependencies of derivation '/nix/store/qd1dn06c0w8rgk0dj2iyqgbwcg8sw0za-emacs-pgtk-native-comp-with-packages-20220828.0.drv' failed to build

17:44:58
@k0kada:matrix.orgk0kada (he/him) *
nix build .#nixosConfigurations.nixos.config.home-manager.users.mon.programs.doom-emacs.package
error: hash mismatch in fixed-output derivation '/nix/store/l5ayjskk8klgdyda9a62a44ngk6x71xg-source.drv':
         specified: sha256-l0cDaMa5qUpIbVT4203tAUA2Ta0O9I15vHSl9fwXKks=
            got:    sha256-TxsGaG2fBRWWP9aas59kiNnUVD4ZdNlwwaFbM4+n81c=
error: 1 dependencies of derivation '/nix/store/jqrsifdklp09mv7f5g0fn7lfs6fr2r7m-emacs-idris2-mode-0.0.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/gdi0zq0w212hgmxnjvi9b4hj4nb9z5bs-install-repo.drv' failed to build
error: 1 dependencies of derivation '/nix/store/a11frw7z2mx9g1s3g792v1wia0znj482-straight-emacs-env.drv' failed to build

Commit 2be2578473e2920dfac7a1d84d41f6ad28d5abcf

17:45:08
@k0kada:matrix.orgk0kada (he/him)

Fixing the hash, I got:

nix build .#nixosConfigurations.nixos.config.home-manager.users.mon.programs.doom-emacs.package
warning: Git tree '/tmp/nixos-config' is dirty
error: builder for '/nix/store/fvqxnfrfn8i7lagp2bkrgxbls2jbxcxv-emacs-idris2-mode-0.0.0.drv' failed with exit code 1;
       last 10 log lines:
       > idris2-warnings.el:77:2: Warning: docstring wider than 80 characters
       >
       > In toplevel form:
       > inferior-idris2.el:78:2: Warning: defvar `idris2-load-packages' docstring wider than 80 characters
       >
       > In idris2-eval-async:
       > inferior-idris2.el:308:2: Warning: docstring wider than 80 characters
       >
       > In idris2-get-idris2-version-string:
       > inferior-idris2.el:410:2: Warning: docstring wider than 80 characters
       For full logs, run 'nix log /nix/store/fvqxnfrfn8i7lagp2bkrgxbls2jbxcxv-emacs-idris2-mode-0.0.0.drv'.
error: 1 dependencies of derivation '/nix/store/lfz4rda6nm1xm1kggjkbivj1w53irmql-install-repo.drv' failed to build
error: 1 dependencies of derivation '/nix/store/jbradj5jzkppxvsipgkcx79ww3fidakz-straight-emacs-env.drv' failed to build
error: 1 dependencies of derivation '/nix/store/vlz6xgqfzhj0nxvid1vb55vrqvvl4qvk-emacs-pgtk-native-comp-with-packages-20220828.0.drv' failed to build
17:47:12
@k0kada:matrix.orgk0kada (he/him) Well, commenting idris2 module for now 17:47:43
@k0kada:matrix.orgk0kada (he/him)
diff --git a/doom/modules/lang/idris2/config.el b/doom/modules/lang/idris2/config.el
index 2b144e9..3db1bd5 100644
--- a/doom/modules/lang/idris2/config.el
+++ b/doom/modules/lang/idris2/config.el
@@ -1,16 +1,16 @@
 ;;; lang/idris2/config.el -*- lexical-binding: t; -*-
 
-(use-package! idris2-mode
-  :mode ("\\.l?idr\\'" . idris2-mode)
-  :config
+; (use-package! idris2-mode
+;   :mode ("\\.l?idr\\'" . idris2-mode)
+;   :config
 
-  (after! lsp-mode
-    (add-to-list 'lsp-language-id-configuration '(idris2-mode . "idris2"))
+;   (after! lsp-mode
+;     (add-to-list 'lsp-language-id-configuration '(idris2-mode . "idris2"))
 
-    (lsp-register-client
-     (make-lsp-client
-      :new-connection (lsp-stdio-connection "idris2-lsp")
-      :major-modes '(idris2-mode)
-      :server-id 'idris2-lsp)))
+;     (lsp-register-client
+;      (make-lsp-client
+;       :new-connection (lsp-stdio-connection "idris2-lsp")
+;       :major-modes '(idris2-mode)
+;       :server-id 'idris2-lsp)))
 
-  (add-hook 'idris2-mode-hook #'lsp!))
+;   (add-hook 'idris2-mode-hook #'lsp!))
diff --git a/doom/modules/lang/idris2/packages.el b/doom/modules/lang/idris2/packages.el
index df843d9..7b9cb63 100644
--- a/doom/modules/lang/idris2/packages.el
+++ b/doom/modules/lang/idris2/packages.el
@@ -1,4 +1,4 @@
 ;; -*- no-byte-compile: t; -*-
 ;;; lang/idris2/packages.el
 
-(package! idris2-mode :recipe (:host github :repo "idris-community/idris2-mode"))
+;;(package! idris2-mode :recipe (:host github :repo "idris-community/idris2-mode"))
diff --git a/home.nix b/home.nix
index d7e8147..5c400a1 100644
--- a/home.nix
+++ b/home.nix
@@ -205,17 +205,17 @@
       doomPrivateDir = ./doom;
       emacsPackage = pkgs.emacsPgtkNativeComp;
       emacsPackagesOverlay = self: super: {
-        idris2-mode = self.trivialBuild {
-          pname = "idris2-mode";
-          ename = "idris2-mode";
-          version = "0.0.0";
-          src = pkgs.fetchFromGitHub {
-            owner = "idris-community";
-            repo = "idris2-mode";
-            rev = "4a3f9cdb1a155da59824e39f0ac78ccf72f2ca97";
-            sha256 = "sha256-l0cDaMa5qUpIbVT4203tAUA2Ta0O9I15vHSl9fwXKks=";
-          };
-        };
+        # idris2-mode = self.trivialBuild {
+        #   pname = "idris2-mode";
+        #   ename = "idris2-mode";
+        #   version = "0.0.0";
+        #   src = pkgs.fetchFromGitHub {
+        #     owner = "idris-community";
+        #     repo = "idris2-mode";
+        #     rev = "4a3f9cdb1a155da59824e39f0ac78ccf72f2ca97";
+        #     sha256 = "sha256-TxsGaG2fBRWWP9aas59kiNnUVD4ZdNlwwaFbM4+n81c=";
+        #   };
+        # };
       };
     };

With this patch your config works fine for me

17:58:15
@mon:tchncs.deribosomerocker
In reply to @k0kada:matrix.org

I mean, you shouldn't set random environment variables without knowing what they do

I can also break a normal doom-emacs installation setting them

I unset those variables though 🤔 and doom emacs works perfectly with those DOOMDIR and EMACSDIR variables, i was just surprised NDE doesnt
18:34:41
@k0kada:matrix.orgk0kada (he/him)NDE does works with those variables perfectly fine, as long you set them correctly18:35:35

Show newer messages


Back to Room ListRoom Version: 9