nix-community / comma

Comma runs software without installing it. [maintainers=@Artturin,@burke,@DavHau]
1.01k stars 47 forks source link

Stop using $NIX_PATH and channels #36

Closed luiswirth closed 1 year ago

luiswirth commented 1 year ago

When using Nix only with flakes you don't need nix channels. It would be nice if comma would work without them too!

> , hello
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)

P.S. I'm probably not going to use comma anymore, so feel free to close this issue, if you're not interested or if it's not feasible.

Artturin commented 1 year ago

Currently we're checking if NIX_PATH contains nixpkgs(users usually remove it if using flakes) and determining if we should use flakes or channels

https://github.com/nix-community/comma/blob/c83ff3839983b3cb8deb407ff618ca12179de588/src/main.rs#L106

Artturin commented 1 year ago

Maybe you were using a old version which doesn't do that. Closing