NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.97k stars 13.98k forks source link

alsa-tools (missing dependency) #220782

Closed cx405 closed 1 year ago

cx405 commented 1 year ago

Describe the bug

The package builds without errors, however the hwmixvolume requires python dependency and fails to start.

Steps To Reproduce

Steps to reproduce the behavior:

  1. nix-shell -p alsa-tools
  2. hwmixvolume
  3. /usr/bin/env: ‘python’: No such file or directory

Expected behavior

hwmixvolume starts

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

This is great package, however its partially broken.

Notify maintainers

@AndersonTorres

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.0.10-lqx1, NixOS, 22.11 (Raccoon), 22.11.3042.5eb98948b66`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.11.1`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

This is stock 22.11 install with stock lqx (liquorix) linux kernel, nothing unusual. Using pipewire + alsa + plasma.

AndersonTorres commented 1 year ago

I am a bit concerned, this program is old and I don't believe it was "updated" for Python 3.

AndersonTorres commented 1 year ago

Please test and report!

cx405 commented 1 year ago

@AndersonTorres well, sadly no change.

> sudo nix-channel --list
nixos https://nixos.org/channels/nixos-22.11

> sudo nix-channel --update -v
unpacking channels...

> nix-shell -p alsa-tools
[nix-shell:~]$ hwmixvolume 
/usr/bin/env: ‘python’: No such file or directory

[nix-shell:~]$ /usr/bin/env python
/usr/bin/env: ‘python’: No such file or directory

[nix-shell:~]$ whereis python
python:

[nix-shell:~]$ whereis hwmixvolume
hwmixvolume: /nix/store/6v6z5ibqq3znzz2sff0qi6px1shdz7k0-alsa-tools-1.2.5/bin/hwmixvolume /nix/store/d41v4aznn6471flnjj6jwrhsvhkzb2s4-system-path/bin/hwmixvolume

[nix-shell:~]$ head -n 5  $(whereis hwmixvolume)
head: cannot open 'hwmixvolume:' for reading: No such file or directory
==> /nix/store/6v6z5ibqq3znzz2sff0qi6px1shdz7k0-alsa-tools-1.2.5/bin/hwmixvolume <==
#!/usr/bin/env python

# hwmixvolume - ALSA hardware mixer volume control applet
# Copyright (c) 2009-2010 Clemens Ladisch
# Copyright (c) 2018 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>

==> /nix/store/d41v4aznn6471flnjj6jwrhsvhkzb2s4-system-path/bin/hwmixvolume <==
#!/usr/bin/env python

# hwmixvolume - ALSA hardware mixer volume control applet
# Copyright (c) 2009-2010 Clemens Ladisch
# Copyright (c) 2018 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>

Thanks!

cx405 commented 1 year ago

However, this is just the tip of the iceberg. As you suggested, the program itself might be outdated or needs research into dependencies:

> nix-shell -p alsa-tools python2Full
these 4 paths will be fetched (10.73 MiB download, 55.77 MiB unpacked):
  /nix/store/5wgigpk83hsblyd4zz062jxxph39d9af-tix-8.4.3
  /nix/store/b2mm7w9pjlvfz8lnc0kk312hcbark954-python-2.7.18.6
  /nix/store/pl9v9pya914q4zk0d1yv37fxz52brk0v-tk-8.6.11
  /nix/store/pxn5d42iamzczxndkp0xfzlpx2na7x19-tcl-8.6.11
copying path '/nix/store/pxn5d42iamzczxndkp0xfzlpx2na7x19-tcl-8.6.11' from 'https://cache.nixos.org'...
copying path '/nix/store/5wgigpk83hsblyd4zz062jxxph39d9af-tix-8.4.3' from 'https://cache.nixos.org'...
copying path '/nix/store/pl9v9pya914q4zk0d1yv37fxz52brk0v-tk-8.6.11' from 'https://cache.nixos.org'...
copying path '/nix/store/b2mm7w9pjlvfz8lnc0kk312hcbark954-python-2.7.18.6' from 'https://cache.nixos.org'...

[nix-shell:~]$ hwmixvolume
Traceback (most recent call last):
  File "/nix/store/6v6z5ibqq3znzz2sff0qi6px1shdz7k0-alsa-tools-1.2.5/bin/hwmixvolume", line 19, in <module>
    import gi
ImportError: No module named gi

[nix-shell:~]$ python --version
Python 2.7.18.6

[nix-shell:~]$ pip
The program 'pip' is not in your PATH. It is provided by several packages.
You can make it available in an ephemeral shell by typing one of the following:
  nix-shell -p cope
  nix-shell -p python310Packages.bootstrapped-pip
  nix-shell -p python310Packages.pip
  nix-shell -p python39Packages.bootstrapped-pip
  nix-shell -p python39Packages.pip

[nix-shell:~]$ exit
exit

user@net > nix-shell -p alsa-tools python310Packages.pip
this path will be fetched (2.00 MiB download, 10.69 MiB unpacked):
  /nix/store/xi185mgy9nhbm3xjrv03jhbf215ayriz-python3.10-pip-22.2.2
copying path '/nix/store/xi185mgy9nhbm3xjrv03jhbf215ayriz-python3.10-pip-22.2.2' from 'https://cache.nixos.org'...

[nix-shell:~]$ pip install gi
ERROR: Could not find a version that satisfies the requirement gi (from versions: none)
ERROR: No matching distribution found for gi
< . . .>

[nix-shell:~]$ pip install pgi
Collecting pgi
  Downloading pgi-0.0.11.2.tar.gz (239 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 239.4/239.4 kB 2.6 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [33 lines of output]
      Traceback (most recent call last):
        File "/nix/store/xi185mgy9nhbm3xjrv03jhbf215ayriz-python3.10-pip-22.2.2/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/nix/store/xi185mgy9nhbm3xjrv03jhbf215ayriz-python3.10-pip-22.2.2/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/nix/store/xi185mgy9nhbm3xjrv03jhbf215ayriz-python3.10-pip-22.2.2/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/run/user/1000/pip-build-env-0uw6ga17/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
< . . .>

Because "making this to run" clearly surpasses "maintaining the package", I don't want to pressure you fixing it. So best resolution may be leaving the issue out until someone can fix it.

AndersonTorres commented 1 year ago

Good to know. I will comment that particular program.

AndersonTorres commented 1 year ago

Solved as "wontfix" :)