Skip to content
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

Add '--save' option to nix-shell #3517

Closed
wants to merge 1 commit into from
Closed

Conversation

raboof
Copy link
Member

@raboof raboof commented Apr 19, 2020

In my first few months of using Nix, I used nix-shell extensively
(it is great!), but had a hard time remembering the shell.nix
syntax.

I'd often find myself starting out by using nix-shell with '-p', making the
command line grow longer and longer as I added additional '-p' parameters
for that project.

I think it would be helpful to have a '--save' option that, instead of starting
a nix shell, produces a shell.nix corresponding to the current set of parameters.
When passed with no parameters, it'd still give me a nice shell.nix to get
started with without having to hunt for an example.

This PR is of course a straw man, very incomplete and perhaps not the right
approach in the first place. I just wanted to provide something more than a
idea.

Would this be interesting to explore further? Are there any particular
requirements or desired behaviour that I should take into account?

@edolstra
Copy link
Member

In general I'd prefer not to add new features to the old UI. New features should probably go into the nix command (e.g. nix dev-shell).

@raboof
Copy link
Member Author

raboof commented Apr 20, 2020

OK, I haven't used nix dev-shell yet, will look into it 👍

@raboof raboof closed this Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants