You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thufschmitt opened this issue
Apr 21, 2021
· 2 comments
Labels
featureFeature request or proposalflakesnew-cliRelating to the "nix" commandnix-shellnix-shell, nix develop, nix print-dev-env, etcUXThe way in which users interact with Nix. Higher level than UI.
Is your feature request related to a problem? Please describe.
When hacking on a project, I frequently find myself wanting to throw in more stuff than what the devShell in flake.nix specifies.
For example, when working on Nix, I like having clangd and gdb (and bear and rr, etc..) available. I also set a few custom MAKEFLAGS.
Conversely, nickel’s flake has a bunch of dev tools as input of its devShell which might not be useful for everyone (so ideally shouldn't have to be in the flake)
With nix-shell, I handled this (in a non-optimal fashion) by having a (gitignored) my-shell.nix overriding the derivation in shell.nix to add everything I needed.
Now that I use nix develop, this trick isn't possible anymore. However I think flakes are also a good opportunity to make this a first-class pattern.
Describe the solution you'd like
I'm not sure how that should look like, but I'd like to be able to have a local file that would override the devShell in the flake, so that I can have all this extra-stuff without having to patch the flake itself, and ensuring that nix build still exactly builds what's specified in the flake file.
Describe alternatives you've considered
I currently have a convoluted direnv setup that loads another flake (with nix print-dev-env) in addition to the local one to bring more programs in scope. But that's both fragile, invasive, and non standard.
I guess #3978 could also enable this use-case (by having another flake that has the upstream one as input and reexports an overriden version of it), although that would still require a bunch of custom setup.
The text was updated successfully, but these errors were encountered:
featureFeature request or proposalflakesnew-cliRelating to the "nix" commandnix-shellnix-shell, nix develop, nix print-dev-env, etcUXThe way in which users interact with Nix. Higher level than UI.
Is your feature request related to a problem? Please describe.
When hacking on a project, I frequently find myself wanting to throw in more stuff than what the
devShell
inflake.nix
specifies.For example, when working on Nix, I like having
clangd
andgdb
(andbear
andrr
, etc..) available. I also set a few customMAKEFLAGS
.Conversely, nickel’s flake has a bunch of dev tools as input of its
devShell
which might not be useful for everyone (so ideally shouldn't have to be in the flake)With
nix-shell
, I handled this (in a non-optimal fashion) by having a (gitignored)my-shell.nix
overriding the derivation inshell.nix
to add everything I needed.Now that I use
nix develop
, this trick isn't possible anymore. However I think flakes are also a good opportunity to make this a first-class pattern.Describe the solution you'd like
I'm not sure how that should look like, but I'd like to be able to have a local file that would override the
devShell
in the flake, so that I can have all this extra-stuff without having to patch the flake itself, and ensuring thatnix build
still exactly builds what's specified in the flake file.Describe alternatives you've considered
I currently have a convoluted
direnv
setup that loads another flake (withnix print-dev-env
) in addition to the local one to bring more programs in scope. But that's both fragile, invasive, and non standard.I guess #3978 could also enable this use-case (by having another flake that has the upstream one as input and reexports an overriden version of it), although that would still require a bunch of custom setup.
The text was updated successfully, but these errors were encountered: