dylanaraps / neofetch

🖼️ A command-line system information tool written in bash 3.2+
MIT License
22.18k stars 1.66k forks source link

Neofetch doesn't show # of installed packages when running Nix on macOS #1792

Open shaunsingh opened 3 years ago

shaunsingh commented 3 years ago

Description

After installing nix as well as neofetch through nix, neofetch will not display the number of packages installed on the system

Only enough, if you install both homebrew and nix, then install neofetch through homebrew, then it does display the number of packages properly (for both nix and homebrew). If you install both homebrew and nix, then install neofetch through nix, it incorrectly shows the number of packages (shows that it only has one package though brew, no mention of nix)

Neofetch version

Neofetch 7.1.0

Screenshot

image

Config file

none

Verbose log

  1. Run neofetch -vv 2> neofetchlog
  2. Upload the contents of neofetchlog to pastebin, gist or equivalent. https://gist.github.com/shaunsingh/877cf7fc59b705d39f88b0b173c970c7
dylanaraps commented 3 years ago

Not a neofetch bug. Brew doesn't seem to be in your PATH according to the verbose log as it is never found. The Nix commands error out and therefore no packages are shown.

https://gist.github.com/shaunsingh/877cf7fc59b705d39f88b0b173c970c7#file-gistfile1-txt-L670-L721

dylanaraps commented 3 years ago

The commands for Nix on macOS could be different I suppose?

shaunsingh commented 3 years ago

I'm using a single-user installation if it makes any difference.

dylanaraps commented 3 years ago

I'm not familiar with how the Nix utilities work (on Linux or MacOS) so we must wait for someone with the expertise.

thebitstick commented 2 years ago

This command should work on both NixOS, Linux running the Nix package manager, and macOS running the Nix package manager for querying the number of packages installed on a system: $ nix-env --query | wc -l