-
Notifications
You must be signed in to change notification settings - Fork 8
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
usage examples / tutorial #2
Comments
https://github.com/shlevy/service-runner The dir-locals.nix here sets up my coq environment with the right coq version and dependencies. |
I have
as my dir-locals.nix but when I do
How should I be using |
I can see I have
so my |
@shlevy I don't think your example works?
|
@idontgetoutmuch Not sure what revision of nixpkgs you have, but I have fiat_HEAD here... Anyway, is it possible |
It does seem like python runs in a separate comint buffer but my elisp isn't good enough to be sure.
|
OK, thanks. I'll try to find time to generalize and clean up my comint hack, but I can't promise any time soon sadly :( In the mean time you can try to copy what we do for coq: https://github.com/NixOS/nixpkgs/blob/038b893338f78bbb879eb6a7c28d8dcd9f9064d2/pkgs/applications/science/logic/coq/default.nix#L53-L78 |
My emacs and nix knowledge are probably insufficient to copy what you did. In the meantime, this very hacky setup seems to work
|
@idontgetoutmuch I do something similar to get a Node REPL, you may be able to work from this: https://github.com/eqyiel/.emacs.d/blob/50ed49a43078e2642da609a0e12970b88a27baaa/config.org#nodejs-repl |
@shlevy Shea, if I'm using I'm trying to get |
@jwiegley Take a look at |
@shlevy So this?
|
I'd first build a GHC environment:
And then put that into your |
@shlevy Do you know a variant of that which creates a Hoogle database for all the local dependencies of the package? :) |
@shlevy Here's my attempt:
|
@shlevy How would I do the same thing as |
@shlevy At least for Haskell, I now have a more convenient way of interacting with projects that do and do not have a default.nix (using
For more complex projects like hnix, I create a full |
@jwiegley I think there's a ghcWithHoogle, but I don't use it myself yet... For coq, do we have a general buildCoqPackage or coq.mkDerivation or whatever? If not, we have to either just take all build inputs or manually add passthru to the relevant packages. |
@jwiegley Nice! For my setup, I have a top-level dir-locals.nix in my home directory that handles haskell projects without their own dir-locals.nix: https://github.com/shlevy/config/blob/72469d4de45f7c6c9fd828f8f4291f1932e3500d/dir-locals.nix |
Related to this, an alternative solution to nix-shell integration to Emacs that I found works better than other solutions I have tried (especially for Python) was brought to my attention here. I have a fork with some usage examples here. As you'll see from the first link this is a different nix-mode and nix-shell than you see floating around elsewhere. Need to make this wider known. |
Superseded by #20, part of the work to get a flake-based version of |
A (few) fully fledged examples of what one can achieve with this would be very helpful.
As far as I understand this looks for a
dir-locals.nix
somewhere in the directory path (to either the default directory or the current buffer's file's directory) and runs nix-build on it to generate a elisp file which is then loaded. Ignoring the safety considerations in above description, of course.What do you use it for? Do you have examples of useful
dir-locals.nix
?The text was updated successfully, but these errors were encountered: