[Nix-dev] How to develop with chicken and emacs

Eike eike at eknet.org
Sun Apr 19 15:25:29 CEST 2015


Hi Ertugrul,

thank you very much for your reply.

Ertugrul Söylemez <ertesx at gmx.de> writes:

> My experience with Chicken is limited, but what you are describing
> sounds about right.  It is indeed the way we develop software with the
> help of Nix.  In Haskell land cabal2nix generates both an expression for
> your project and a (separate) expression that drops you into a shell
> with all the dependencies in scope.

The longer I think about the nix-shell approach, the better I like it. I
can now distribute the complete development environment along with the
source code. That's really great!

>> But the real problem is, that my emacs doesn't know about this
>> environment. I don't know how to handle this (besides starting a new
>> emacs from the nix-shell shell, which I don't want).
>
> The way I do this is to fire up a Makefile from Emacs.  The Makefile
> uses nix-shell to start the actual builder:
>
>     nix-shell --pure --command "./Setup build"
>
> This is an indirection, but it makes sure that the environment the
> builder sees is (fairly close to) the environment the build script would
> see when you use nix-build.  And indeed, you can actually use nix-build
> as well, although you probably don't want to, because it rebuilds the
> whole thing all the time.

That's a good tip! I will start with this. But it still wouldn't allow
me to use the interactive features of emacs, if I understand correctly?
It would be great to evaluate expressions inside emacs without building
the whole app.

> I hope this helps.

It did, thank you.

Regards
Eike

--
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D  E59C B412 C5F5 AD7A C35E


More information about the nix-dev mailing list