nix-community / nix-emacs

A set of useful Emacs modes and functions for users of Nix and Nix OS.
226 stars 32 forks source link

add nixos sandbox utilities, fixes #16 #17

Closed svenkeidel closed 8 years ago

svenkeidel commented 8 years ago

So, I stripped out the Haskell related stuff, added some autoload annotations and a copyright and license notice. I'm open for suggestions and improvements.

travisbhartwell commented 8 years ago

Looks good, sorry I'm just now getting to it.

As @CestDiego commented inline, these functions aren't necessarily NixOS-specific, they could be used on another system that just has the Nix package manager installed. It still belongs in our repo, but I'd probably do a s/nixos/nix/ in your changes.

Given those changes, I'm not opposed to merging this. Afterwards, we should do a PR on MELPA so this can be included as a package in its own right.

CestDiego commented 8 years ago

+

svenkeidel commented 8 years ago

So, finally I have the time to do some open source work. I made the changes you requested, fixed a few bugs and made the shell command more reliable.

Best, Sven

CestDiego commented 8 years ago

I approve, this looks very cool. :) I'll wait for @travisbhartwell look on this.

wedens commented 8 years ago

I've tried to use it (just copy-pasted contents to my .emacs) and flycheck is not reporting any errors

CestDiego commented 8 years ago

I've tried this and this looks good. @wedens thank you for the report.

CestDiego commented 8 years ago

@svenkeidel thank you, good job. You can safely delete your branch

svenkeidel commented 8 years ago

@wedens, here is the necessary glue code to let flycheck now about your sandbox environments.

wedens commented 8 years ago

@svenkeidel I've been trying to use it with exaclty this glue code :/

Pitometsu commented 8 years ago

Awesome enhancement!

But if I, for example, would use nix sandbox for Rails development, then I should add nix-mode wrappers as a number of separate PR to each of:

Not so cool :(

Pitometsu commented 8 years ago

Maybe better just overwrite (add advices?) some shell- commands? But in this case each shell command will take too much time... Any ideas? :)

svenkeidel commented 8 years ago

@wedens, Please open a new issue and send me your default.nix \ shell.nix file and the relevant section of your emacs configuration.

svenkeidel commented 8 years ago

@Pitometsu, It is not that simple to just activate nix-mode for all plugins you mentioned. The plugins have to provide hooks and then it might be possible to make the nix aware.