NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.94k stars 13.96k forks source link

macchina can't read GPU name from pci.ids #345963

Open MrSom3body opened 2 weeks ago

MrSom3body commented 2 weeks ago

Describe the bug

Trying to display the GPU in macchina doesn't work, probably because of the hard-coded path to pci.ids file.

Steps To Reproduce

Steps to reproduce the behavior:

  1. run macchina -o gpu
  2. see no output

Expected behavior

Your GPU name should be displayed.

Additional context

I think that my issue is related to this issue.

Notify maintainers

@figsoda @414owen

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.11.0, NixOS, 24.11 (Vicuna), 24.11.20240929.06cf0e1`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.8`
 - channels(root): `"home-manager, nixos-24.05"`
 - nixpkgs: `/nix/store/r2hk87rfvc5fpfbl2bj64a3x7mcq9f6c-source`

Add a :+1: reaction to issues you find important.

Frontear commented 2 weeks ago

Seems the root case is due to the usage of the pciid-parser create, see the offending code.

They do offer a @hwdata@, though I'm not directly sure how we could pass that to it. It seems macchina has an abstraction over it called libmacchina.. currently investigating.

EDIT: sorry for ping I didn't expect it to actually ping a user.

nixos-discourse commented 2 weeks ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/patching-a-rust-crate/53806/1