Open remi-gelinas opened 2 years ago
Try this:
From 99b749e1c5e6d061b376d789c1756ce9b3241ad0 Mon Sep 17 00:00:00 2001
From: ckie <git-525ff67@ckie.dev>
Date: Fri, 10 Jun 2022 17:50:53 +0300
Subject: [PATCH] home/doom-emacs: maybe fix nix-community/nix-doom-emacs#141
---
home/doom-emacs/default.nix | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/home/doom-emacs/default.nix b/home/doom-emacs/default.nix
index 1ca9ebb..1f46aab 100644
--- a/home/doom-emacs/default.nix
+++ b/home/doom-emacs/default.nix
@@ -10,7 +10,8 @@ lib.mkMerge [
{
enable = true;
doomPrivateDir = ./doom.d;
- emacsPackage = ((emacsPackagesFor emacsUnstable).emacsWithPackages (epkgs: with epkgs.melpaStablePackages; [ flycheck ]));
+ emacsPackage = emacsPackagesFor emacsUnstable;
+ extraPkgs = epkgs: [ epkgs.melpaStablePackages.flycheck ];
};
}
(lib.mkIf isLinux {
--
2.36.0
If that still doesn't work you might need to overrideAttrs it a bit like some of these.
(naming your repository nixpkgs
is incredibly confusing :P)
I'm facing the same problem but the solution above did not work for me... @remi-gelinas were you able to fix it?
I was taking a look on our code where we get the Emacs derivation to be used... And well, it is complicated:
This behavior may/may not explains the issue you're seeing, and also explain another issue that I saw when trying vterm
module from Emacs. See: https://github.com/thiagokokada/nix-configs/commit/4f845d4766fa5d29b6c178beaf73a3596fe0ca91
I did this emacsPackagesOverlay
because Emacs was build with the wrong source code it seems, and know that I took a look at the code this makes sense why it happened.
I'm trying to set up emacs package management in Nix specifically rather than using the builtin
nix-straight
management, and I noticed theemacsPackage
option allows you to provide a custom emacs package to use to derivedoom-emacs
.I've added the community
emacs-overlay
as a flake input (and made surenix-doom-emacs
follows the same pinned version). I've setemacsPackage
to a custom build withflycheck
installed here. Building that results in a missing version attribute, presumably from the emacs package that's now the base fordoom-emacs
.Tracing the custom base package however shows that the
version
is set to"28.1"
- expected, since the baseemacsUnstable
fromemacs-overlay
being used is28.1
.Does
emacsPackage
require a base non-derived emacs package fordoom-emacs
to build correctly? Or am I missing a key part of the process to build a custom emacs package?For reference, I am using the NixOS wiki Emacs article and the source from the home-manager module option here.
I've tested the custom base package in
environment.systemPackages
andhome.packages
without issue, so the error is isolated to using it as a base fordoom-emacs
.