-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package not available: idris2-mode #259
Comments
This does not work. See #177. As a workaround, you may try to add If you want only to do it yourself, try |
And yeah, the documentation is bad. Both me and @ckiee are fault of it, because we are kinda of advanced Nix users and I think for both of us the documentation is enough (specially the source code documentation). PRs are welcome to improve it too. |
I already tried using And about that, I'll be very happy to PR some improvements to the documentation once I get this working. If I have some free time, I'll also frequently make issues whenever this breaks to bulletproof it further, since this project seems to be infamous to just not work :(. Anything to get declarative configuration usable in more places. |
Try something like this (doing by memory, maybe wrong): { pkgs, ... }:
{
emacsPackagesOverlay = self: super: {
package = super.melpaBuild {
pname = "package";
version = "0.0.0";
src = pkgs.fetchFromGitHub { /* ... */ };
/* more things here if necessary */
};
};
} |
See #212 for a similar case. Also, the source of this is we just extract the package names from Emacs/doom/straight and not any of the URL/version metadata. I've tried fixing that before but have gotten lost in piles of lisp, obscure store paths and weird nix code.
I've found it's hard to modify English in place so feel free to change the phrasing if you aren't sure how to add something otherwise. But, yes, docs are very welcome. |
Wow, I just came across a disturbing amount of problems trying to use programs.doom-emacs = {
enable = true;
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 = "";
};
};
};
}; (yes, I know the sha256 is empty, but that's just to get nix to tell me the hash I need to put there, and it doesn't error about that) in my home-manager configuration, but for whatever reason that errors with: so I tried to comment that all out, but then I get this: error: attribute 'overrideAttrs' missing
at /nix/store/sjmq1gphj1arbzf4aqqnygd9pf4hkfkf-source/pkgs/top-level/emacs-packages.nix:75:13:
74| # Propagate overriden scope
75| emacs = emacs'.overrideAttrs(old: {
| ^
76| passthru = (old.passthru or {}) // {
(use '--show-trace' to show detailed location information) (though, I did use |
Unless you're using the wrong arch by mistake, this looks cursed. This definitively looks more like a support request now than a bug. I think this is one more point in favor for #252. |
I am not on the wrong arch by mistake. Yeah, I tried asking in the matrix "Nix Emacs" channel but no one used nix-doom-emacs here. That, and the docs situation, plus how the errors I get from nix-doom-emacs are unique to it, this just forced me to create an issue, at least if I want to use doom emacs declaratively. Nevertheless, I didn't reallly file this as a bug, I definitely knew it was something else. |
And what I think it is, is that this is a (no offense, again) very.. uh, monkeypatched project; meaning that it's flimsy and seems to be very easy to break from what I've seen. It might be due for a rewrite if possible, I mean I've known and attempted to use nix-doom-emacs for about 7 months by now, never have I succeeded. And I have met tens of people who also tried this project and also didn't get it working... What do you think? I mean, I don't really remember coming upon a person who has gotten it working at this point I think, though I don't think that it's impossible; just that this is very rare to even function on most systems. I doubt I'm experienced enough, though I'd also love to help with any issue or rewrite if possible, it's just I was delaying that to if I could get this working to get a feel of how the project works. |
What is the best thing I can recommend you is try posting a minimal example to reproduce your issue using Flakes, and I can try to help.
Yeah, it is kinda of a project that depends on many different variables. Definitively not ideal, and me and ckie are basically maintaining it for our own usage. Maybe I should just put a warning in README "here be dragons" or something, because it is definitively not a project that is to be used unless you have deeply knowledge on Nix/Emacs and are also kinda of comfortable to fix issues in the code yourself. |
I'm surprised it's been that flimsy for you, like I use it every day and there's the CI running with the update cronjobs and all of that. I guess looking at my wrapper module it does have some stuff that could be covered in NDE itself. #69, #60 and another issue# I don't remember. (..if it exists)
I think both of us have a fair bit of knowledge about the internals but they're quite suboptimal and don't feel worthy of the effort needed to write it down, at least for me. A dive into the lisp/nix/straight hell again would be useful but packages haven't been changing a lot recently so it hasn't been biting me enough to do anything beyond talk about it. (Also, as I just wrote in #252, the matrix room exists now.) |
So to fix the diff --git a/home.nix b/home.nix
index 09ad206..3ba2b78 100644
--- a/home.nix
+++ b/home.nix
@@ -215,7 +215,7 @@
emacs = {
enable = true;
- package = inputs.nix-doom-emacs;
+ #package = inputs.nix-doom-emacs;
#package = pkgs.emacsPgtkNativeComp;
extraPackages = epkgs: [ epkgs.vterm ];
}; This is still not sufficient to build ( BTW, there is no need to set |
I fixed it! other than the above diff, I had to do:
|
Thank you! |
Hello :) I should say that I'm kind of surprised I got to this point, (no offense, this is criticism in hope to inspire improving the documentation), the docs sure appear like they didn't want me to. (Specifically, this part is very confusing. it should be specified that you mean
packages = inputs.nix-doom-emacs;
here.Anyways, onto my main problem: I add a module into my Doom folder, at
modules/lang/idris2
, mainly because Doom Emacs doesn't have an Idris2 module, and I have 2 files there:doom/modules/lang/idris2/config.el
doom/modules/lang/idris2/packages.el
And, finally, I have
:lang idris2
in myinit.el
file. The big issue though, is that nix-doom-emacs doesn't seem to want to use these settings to fetch the repository (this extension isn't on ELPA, and there's also no documentation about how to install extensions that aren't on ELPA, from Git...), and errors with:error: evaluation aborted with the following error message: 'Package not available: idris2-mode' (THIS IS THE VERY LONG TRACE)
The text was updated successfully, but these errors were encountered: