!ZmUSesoOjmVsKbzFbp:nixos.org

Nix Emacs

785 Members
All things Nix/Emacs! https://github.com/nix-community/emacs-overlay | For Doom Emacs: https://matrix.to/#/#doom-emacs:nixos.org176 Servers

Load older messages


SenderMessageTime
28 Oct 2024
@tactfulvessel:matrix.orgtactfulvesselthanks08:09:01
@me:linj.techlinjrev is git tag or commit 08:09:29
@me:linj.techlinjbtw, do not use trivialBuild08:09:57
@me:linj.techlinjI will change that part of the wiki08:10:30
@tactfulvessel:matrix.orgtactfulvesselI think i will try switching to doom emacs since the new overlay nix-doom-emacs-unstraightened fixed a lot of issues in nix-doom-emacs08:10:55
@me:linj.techlinjmelpaBuild is a good default 08:10:58
@tactfulvessel:matrix.orgtactfulvesselmelpaBuild instead of trivial build, ryt?08:11:28
@tactfulvessel:matrix.orgtactfulvesselbtw the example in the wiki did not say anything about the configurePhase or installPhase or anything? Does melpaBuild take care of putting things in the right place?08:12:44
@me:linj.techlinj
In reply to @tactfulvessel:matrix.org
btw the example in the wiki did not say anything about the configurePhase or installPhase or anything? Does melpaBuild take care of putting things in the right place?
yes if the package follows the convention
08:14:10
@me:linj.techlinjif a package is not on melpa or elpa, it is possible that it does not follow convention though08:16:03
@tactfulvessel:matrix.orgtactfulvessel that's why i think I try to switch to doom-emacs using nix-doom-emacs-unstraightened\ 08:17:24
@oddparity:arcticfoxes.netoddparityWhen by mistake infinite loop just kill emacs, and then sly will start from zero, I think. Also, is there an easier way, to terminate infinite loop? Also does anyone know in common lisp if (loop for i from 0 do (funcall x) until (> i 3)) can just not have the i-based condition (and for example have a boolean value) so that you can simply have the do {} until(...); functionally and also calculate how many steps you have looped with the until condition? such as (loop for i from 1 do (print i) (funcall x) until otherCondition) I was trying to check this but then I made an infinite loop by mistake23:55:59
29 Oct 2024
@rrix:aelf.landrrixjamming Ctrl-g or send the process SIGUSR1 is usually good enough for me, i have to do something stupid with the undo stack to get emacs so tied up that even those don't work00:41:04
@swendel:curious.bio@swendel:curious.bio left the room.06:24:18
@ihar.hrachyshka:matrix.org@ihar.hrachyshka:matrix.org

let's say I want to give emacs access to some additional dependencies (binaries like go or fd etc. whatever is NOT installed in global home.packages). I figured I can drop these into buildInputs and it kinda works. But this means recompiling emacs every time I need a new thing, plus seems not correct to inject on build when I need these on execution only. Of course, there's always an option to pollute the environment with these, and it also works.

I tried .emacsWithPackages but it doesn't seem to work (is it just for epkgs?)

How do you folks add dependencies for emacs runtime?

15:25:38
@rvlobato:matrix.org@rvlobato:matrix.org left the room.15:57:52
@bestlem:matrix.orgbestlem Ihar Hrachyshka: One way is to use direnv - emacs has a package envrc and nix has added nix-direnv. When you change to a buffer in a project the environment including exec-path is added to. Thus you only put go on your path when your project needs it.
Your emacs packages do all need to be loaded in one lump - I suspect dynamic does not work here as they are all in the same p[rocess and namespace.
16:36:13
@ihar.hrachyshka:matrix.org@ihar.hrachyshka:matrix.orgthis may be complicated by the fact that it's emacs server running as launchd daemon. AFAIU its PATH is determined on server startup, not client connect?16:58:18
@zororg:matrix.orgzororgYes. But direnv+envrc, makes file visiting buffer change environment variables.17:02:27
@zororg:matrix.orgzororgSo you get shell.nix inside emacs (client) buffer17:02:55
@ihar.hrachyshka:matrix.org@ihar.hrachyshka:matrix.orgack, I'll try that. so look like there's no generic way to make a wrapped version of a package with modified PATH scope?17:05:53
@ihar.hrachyshka:matrix.org@ihar.hrachyshka:matrix.org * ack, I'll try that. so looks like there's no generic way to make a wrapped version of a package with modified PATH scope?17:06:18
@zororg:matrix.orgzororgThere is. Imo most of the nix packages are wrappers with dependencies and path variables.17:07:32
@zororg:matrix.orgzororgBut direnv makes it easy to have project or directory specific environment setup17:08:16
@ihar.hrachyshka:matrix.org@ihar.hrachyshka:matrix.orgAck, thanks for the info. A slight drawback I see is that direnv requires some additional prep work for env files, and it may require negotiation with projects to include shell.nix / carry your own untracked env settings. This is definitely the way to go for more granular deps, but since I work with python and golang projects every day, and LSP setup for these (and other languages) is table stakes for me, I'd be happy to have golang, pyright, fd etc. embedded into path for any emacs buffer and deal with direnv for more granular tweaks.17:13:30
@zororg:matrix.orgzororgwith shell.nix you can have shell with those packages. Just enable direnv in home config, and you are good to go17:18:59
@bestlem:matrix.orgbestlemand to load the path from a shell.nix (or dev shell in flake,nix) if not on Linux e.g. on macOS The author of envrc also has the emacs package exec-path-from-shell that will add the environment variables from your shell to those in the emacs daemon17:31:08
31 Oct 2024
@icy_thought:matrix.org@icy_thought:matrix.org joined the room.00:25:27
@icy_thought:matrix.org@icy_thought:matrix.org set a profile picture.00:39:29
@icy_thought:matrix.org@icy_thought:matrix.org left the room.01:27:21

Show newer messages


Back to Room ListRoom Version: 6