-
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
Single file usage of nix-buffer #8
Comments
You could possibly use nix-buffer--nix-build for this already, but I wouldn't object to a better interface |
Do you think it's okay to bypass the safety checks? In this case there's not really a "file" in the same way as for dir-locals.nix. I guess I can make it just use the file name alternatively. |
Yeah, you can bypass the security checks, you're already running a file-local eval |
add-nix-buffer-with-string can be used to call nix-buffer with a string so you don’t need to have a dir-locals.nix This is how I set it up in a Haskell program: (put at the end of the file) -- Local Variables: -- eval: (nix-buffer-with-string "let pkgs = import <nixpkgs> {}; -- in pkgs.nixBufferBuilders.withPackages -- [(pkgs.haskellPackages.ghcWithPackages (self: with self; [parsec QuickCheck hpc]))]") -- End: Fixes shlevy#8
@matthewbauer Let me know if you plan to pick this up again, or we can close it out for now. |
Right now, I don't think there is a way to get nix-buffer to work without a separate dir-locals.nix. It seems like there should be a way to set it up entirely through the `file local variables'.
For instance, I have a Haskell file that doesn't have any Stack/Cabal/etc. dependencies associate with it. Is there a way I can include dependencies in it?
I basically want to setup something like this:
and have it work out of the box. Is that seem reasonable? This is just me brainstorming how to do this right now.
The text was updated successfully, but these errors were encountered: