nix-community/nix-doom-emacs

[Request] :recipe support

ratsclub opened this issue · 4 comments

Would love if recipe support was possible. Without its almost impossible to use nix-doom-emacs.

Reference: https://github.com/vlaci/nix-straight.el/issues/7

ckiee commented

(Transferred because really nix-straight.el's issues should go here. Also disabled issues over there)

Check out https://github.com/vlaci/nix-straight.el/issues/1: we currently only obtain the list of needed packages and use whatever versions emacs-overlay has. This is the way it was implemented pre-vlaci-fork and my last attempt at fixing it was very frustrating and I ran out of patience.

A workaround would be to use emacsPackagesOverlay.

@ckiee I tried adding the code below but I couldn't load denote yet. Am I doing something wrong? kubernetes[-evil] also are loaded from packages.el not from my overlay.

{
  programs.doom-emacs = {
    enable = true;
    doomPrivateDir = ./config;
    emacsPackagesOverlay = self: super: {
      kubernetes = pkgs.emacsPackages.kubernetes;
      kubernetes-evil = pkgs.emacsPackages.kubernetes-evil;
      denote = pkgs.elpaBuild rec {
        pname = "denote";
        ename = "denote";
        version = "0.1.0.0.20220628.172614";
        src = pkgs.fetchurl {
          url = "https://elpa.gnu.org/devel/denote-${version}.tar";
          sha256 = "sha256-5KCB5cLfVizQASC3uZApQ74y5oa0pZXZ246al4NNos8=";
        };
      };
    };
  };
}

Thanks for the help!

Solved like this:

    emacsPackagesOverlay = self: super: {
      denote = self.trivialBuild {
        pname = "denote";
        ename = "denote";
        version = "0.1.0";
        src = pkgs.fetchFromSourcehut {
          repo = "denote";
          owner = "~protesilaos";
          rev = "0.1.0";
          sha256 = "sha256-csY9dxUpTw6hWwL+JJnNOsbLNlToIfh/gsdxS1uEQtg";
        };
      };
    };

Solved like this:

    emacsPackagesOverlay = self: super: {
      denote = self.trivialBuild {
        pname = "denote";
        ename = "denote";
        version = "0.1.0";
        src = pkgs.fetchFromSourcehut {
          repo = "denote";
          owner = "~protesilaos";
          rev = "0.1.0";
          sha256 = "sha256-csY9dxUpTw6hWwL+JJnNOsbLNlToIfh/gsdxS1uEQtg";
        };
      };
    };

Thank you!