Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

b4: propagated Python missing ply, gitpython modules #392346

Open
3 tasks done
blitz opened this issue Mar 23, 2025 · 0 comments
Open
3 tasks done

b4: propagated Python missing ply, gitpython modules #392346

blitz opened this issue Mar 23, 2025 · 0 comments
Labels
0.kind: bug Something is broken

Comments

@blitz
Copy link
Contributor

blitz commented Mar 23, 2025

Nixpkgs version

  • Unstable (25.05)

Describe the bug

When calling b4 prep --check it calls scripts/spdycheck.py from the Linux source. This script pulls in Python via #!/usr/bin/env python3. This is unfortunately a Python lacking modules to execute the script. Given that this overrides any Python I have in PATH, there is no good solution for the user to make this work.

$ b4 prep --check                                
Checking patches using:
  /home/julian/src/own/linux/scripts/checkpatch.pl -q --terse --no-summary --mailback --showfile
---
...
  ● checkpatch.pl: Traceback (most recent call last):
  ● checkpatch.pl:   File "/home/julian/src/own/linux/scripts/spdxcheck.py", line 6, in <module>
  ● checkpatch.pl:     from ply import lex, yacc
  ● checkpatch.pl: ModuleNotFoundError: No module named 'ply'

Adding ply and gitpython modules to propagatedBuildInputs in the b4 derivation doesn't fix this.

This is unfortunate, because any Python in PATH that has these modules is ignored. So from my perspective, the solution would be to either propagate a Python with the right modules or not propagate a Python at all.

Steps to reproduce

Expected behaviour

b4 prep either adds no Python to PATH of utilities it calls or one with the right modules.

Screenshots

No response

Relevant log output

Additional context

No response

System metadata

❯ nix run nixpkgs#nix-info -- -m

  • system: "x86_64-linux"
  • host os: Linux 6.13.7, NixOS, 24.11 (Vicuna), 24.11.20250319.b75693f
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Lix, like Nix) 2.92.0 System type: x86_64-linux Additional system types: aarch64-linux, i686-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/julian/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/julian/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/julian/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/julian/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf:/nix/store/ys1zqxjyiczkny9bfi1f7i6clm1z39cd-gnome-settings-daemon-47.2/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/vyfqgaip2hbylhhm1lci1zfvxv6a5g28-lix-2.92.0/share
  • channels(root): ""
  • nixpkgs: /nix/store/xnws56qm6sg7yc7dbw62c1y24s9jhcpf-source

Notify maintainers

@jb55 @mfrw @alyssais


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

@blitz blitz added the 0.kind: bug Something is broken label Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

1 participant