A full wrap isn't needed as these scripts are only run from within
hplip's own environment, and unwanted because they are imported
as Python modules.
Also fix a reference to /etc in $out/etc/hp/hplip.conf, though I've no
idea whether it is actually used.
Something changed in the generic fixupPhase magic exposing a bug
in the previous fix (wrapPythonPrograms where I should have used
wrapPythonProgramsIn).
Also move buildInputs and friends to a more conventional spot.
None of the installed tools like hp-align or hp-toolbox could
work, because they tried to import wrapped Python scripts (i.e.
shell code) as Python modules. Fix this by:
- Substituting `dbus` for the defective `pythonDBus`.
- No longer blindly wrapping all python files, but replacing
the original symlinks in $out/bin with wrapper scripts.
These wrappers then `exec` the unmodified Python scripts in
$out/share/hplip directly, instead of the .<name>-wrapped
copy that wrapPythonProgramsIn creates. The latter are simply
removed.
Sure, it's a bit ugly. It's also 2015 and I couldn't use my
printer :-/
This reverts commit 1b064645ed10a2bee70faec6896d4d33e2a86300, reversing
changes made to 14cef95e84e44a830b7317c095c7ffd6b9796fef.
As discussed in the comments to the aforementioned pull request, while
the new version supports many new printer models, many components of the
driver are broken because of some corner cases in the Python wrapper. In
particular, the loader for the binary binary driver needed by many
middle- and high-end printers is broken, negating most of the value in
updating!
This is used to generate ppd files for cups:
$ cups-genppd.5.2 -M | grep p50
canon-cp500
escp2-p50
$ cups-genppd.5.2 -p . escp2-p50
This will create the relevant ppd file in the current directory. This
can then be used by cups after setting services.drivers.drivers =
[pkgs.gutenprint]; and configuring the printer to use this ppd e.g.
via the web interface on http://localhost:631