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
HPLIP: Fix PostScript printers, installed utilities #29616
Conversation
We cannot rely on wrapPythonPrograms to wrap the installed executables because they are symlinks (which it ignores). Instead, we have to emulate it to make the wrappers ourselves.
wrapProgram $out/lib/cups/filter/hpps \ | ||
--prefix PATH : "${nettools}/bin" | ||
# The installed executables are just symlinks into $out/share/hplip, | ||
# but wrapPythonPrograms ignores symlinks. We cannot replace the Python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abbradar you recall whether that is on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can answer that. wrapPythonPrograms
ignores symlinks because you have to do this gymnastics of patching the target, deleting the symlink, and creating a wrapper directly to the target. I think it doesn't want to implement this logic because it assumes you can just call wrapPythonPrograms
on the actual target, but we can't do that here.
Hi @ttuegel! A weird feeling of déjà vu: I thought I made this exact change, and comment, ages ago. Except, well, I obviously didn't... Thanks for taking care of this. It's probably painfully obvious I no longer use Nix* myself, and should remove myself as a maintainer. ( 😿 ) |
@nckx Someone made this change to hplip-15.09, it may have been you! That's what this change was based on, I just streamlined it a little by emulating |
Motivation
This PR fixes two bugs:
wrapPythonPrograms
ignores symlinks! We cannot wrap the symlink targets, either, so we must emulate it ourselves.Testing
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)