nix-community / dream2nix

Simplified nix packaging for various programming language ecosystems [maintainer=@DavHau]
https://dream2nix.dev
MIT License
972 stars 122 forks source link

Start shell with dependencies without creating a new flake file #854

Open tobiasBora opened 6 months ago

tobiasBora commented 6 months ago

It is often the case that I want to quickly spawn a shell without creating 15 lines of flake.nix. Mach-nix was proposing a syntax like:

$ nix shell mach-nix#gen.python.package1.package2

which is (despite a huge time to download 500MB of who knows what) quite practical. Would it be possible to provide something along this line for dream2nix?

DavHau commented 6 months ago

Possible for sure. We just have to come up with an architecture for it. What's different in dream2nix is that dependencies are resolved impurely. That means we cannot put the resolver in a derivation like with mach-nix. We might be able to use something like impure-derivations to generate a lock file and then build the environment from it.

tobiasBora commented 6 months ago

I see, cool. Actually, being able to use the current nixpkgs might be interesting to avoid downloading too much new things.