nix-software-center icon indicating copy to clipboard operation
nix-software-center copied to clipboard

Packages installed by options not listed as installed

Open davidak opened this issue 3 years ago • 3 comments

For example Steam:

Screenshot from 2022-11-16 22-17-54

Maybe there would be a way to recognize this situation and integrate with nixos-conf-editor to have one button to edit it there.

davidak avatar Nov 16 '22 21:11 davidak

I have considered showing something along these lines, however, currently, there isn't a good way to figure out exactly which packages are installed by which options other than evaluating all of nixpkgs. I've seen that nix-store --query --requisites /run/current-system shows all derivations, but there isn't always a 1-1 match from derivation to attribute, so it would be as unreliable as nix-env. It could probably be done manually in the future though

vlinkz avatar Nov 16 '22 21:11 vlinkz

I think maintaining the matching manually is too unreliable, because it will easily get out-of-date.

Could we or Nix cache the result and have to evaluate nixpkgs only once? I think they do that for available packages, so it should be possible to do it with options as well.

davidak avatar Nov 16 '22 22:11 davidak

Yeah that could be done, not sure how to do it though since that information doesn't seem to be in the evaluated options

vlinkz avatar Nov 16 '22 22:11 vlinkz