Closed yaitskov closed 2 years ago
The best way is IMO to use direnv-mode
and one of the many Nix/direnv integrations.
The best way is IMO to use
direnv-mode
and one of the many Nix/direnv integrations.
direnv just runs local .bashrc for the project, right? I still have to generate proper PATH by "hand".
Second more stable version of my workaround would be
.envrc
export PATH=$(nix-shell --run 'bash -c "echo $PATH"')
It is more stable, but looks like a superhack.
doh. direnv times out with the second workaround:
direnv: ([/usr/bin/direnv export bash]) is taking a while to execute. Use CTRL-C to give up.
There are many ways to use direnv with nix. E.g. https://direnv.net/man/direnv-stdlib.1.html#codeuse-nix-code
Anyway, this isn't an Emacs issue any more :)
Thanks. I've got use
is a magic command defined by direnv.
HLS 1.4 eats different amount of RAM depending on the way it is bound to Emacs.
use nix
- 2.5 gb
export GHC, cabal and hls to PATH
- 2.2 gbwhere 300mb? ;)
direnv slows down noticeably regular nix-shell launch in a terminal - I see it prints to log.
Hi,
I am looking for a proper way to specify path to haskell-language-server in a nix project.
I found workaround with following snippet in my .bashrc:
I get paths by hand from nix-shell
This is very rigid and not convenient.
I tried to use following script but it is not working
/home/user/hls.sh
chmod +x /home/user/hls.sh
Emacs messages that hls exists. Launching hls.sh manually from terminal is working though.