Commit Graph

106 Commits

Author SHA1 Message Date
Profpatsch
4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00
Bryan Gardiner
60df55c9fb
hplip: fix hp-setup crash by adding proper NixOS PPD search path
HPLIP's getSystemPPDs() function relies on searching for PPDs below common FHS
paths.  None of these exist on NixOS, but the code assumes that at least one of
the directories will be found, and crashes when it doesn't (cups_ppd_path is
None and the code passes that to os.path.join).

A usable PPD search path for the running system on NixOS is
/var/lib/cups/path/share, so this patches the source to check this path as well.
This should fix the NixOS case and keep non-NixOS cases working too.
2021-01-09 17:07:30 -08:00
Doron Behar
b6270a2d90 hplip: 3.20.5 -> 3.20.11 2021-01-05 10:23:16 +02:00
Graham Christensen
bc49a0815a
utillinux: rename to util-linux 2020-11-24 12:42:06 -05:00
Doron Behar
359f2345c0 hplip: Remove all python related gcc references
Use in stripDebugList python sitePackages directory used by the build,
and don't hard code python3.7's sitePackages path.
2020-07-12 14:24:05 +03:00
Florian Klink
907353b1e4 hplip: use wrapQtApp
Otherwise, things like hp-setup segfault if you run them from another
nixpkgs checkout:

```
HP Linux Imaging and Printing System (ver. 3.20.5)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

[1]    4543 abort (core dumped)  result/bin/hp-setup
```
2020-06-16 20:34:30 +02:00
Bastian Köcher
88f749545c hplip: Add missing library
Otherwise, things like `hp-setup` fail finding gi:

```
HP Linux Imaging and Printing System (ver. 3.20.5)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Traceback (most recent call last):
  File "/nix/store/rmzq8c4n47s4q4p31w18waz0zrba2ljl-hplip-3.20.5/share/hplip/setup.py", line 314, in <module>
    ui = import_module(ui_package + ".setupdialog")
  File "/nix/store/n0b076p351ma864q38if4yglsg99hw2s-python3-3.8.3/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/nix/store/rmzq8c4n47s4q4p31w18waz0zrba2ljl-hplip-3.20.5/share/hplip/ui5/setupdialog.py", line 31, in <module>
    from base import device, utils, models, pkit
  File "/nix/store/rmzq8c4n47s4q4p31w18waz0zrba2ljl-hplip-3.20.5/share/hplip/base/pkit.py", line 38, in <module>
    from gi import _gobject as gobject
ModuleNotFoundError: No module named 'gi'
```
2020-06-16 20:26:40 +02:00
Florian Klink
fd2627babf
Merge pull request #89120 from dasj19/hplip-update
Upgrade hplip & hplip plugin to 3.20.5
2020-06-16 01:33:06 +02:00
Daniel Șerbănescu
37583e45a2 hplip: 3.20.3 -> 3.20.5 2020-06-16 01:31:14 +02:00
Doron Behar
c59e8d3fb3 hplip: don't reference gcc in binaries from /share and other locations 2020-06-03 20:32:32 +03:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Daniel Șerbănescu
d7d3b0deff hplip: 3.19.12 -> 3.20.3 2020-03-24 22:17:40 +01:00
talyz
c4f58aba47 hplip: Fix plugin url and hash 2020-01-22 10:23:01 +01:00
Thomas Tuegel
c6bed9f7dd
Merge pull request #76128 from Mic92/hplip
hplip: 3.19.6 -> 3.19.12
2020-01-16 10:01:10 -06:00
Jörg Thalheim
725f85e271
net-snmp: rename from net_snmp 2019-12-21 22:56:08 +00:00
Jörg Thalheim
4d7ae1e646
hplip: 3.19.6 -> 3.19.12 2019-12-21 07:39:09 +00:00
Graham Christensen
821d50e304
hplip: add dbus-python to the deps 2019-12-18 23:12:23 -05:00
Graham Christensen
34e63b4615
hplip: python2 -> python3
Tested with a local HP printer
2019-12-18 23:12:19 -05:00
Frederik Rietdijk
8ea50952b2 hplip: use python2Packages
While Python 3 is (partially) supported, it requires more effort to fix
it.
2019-11-13 16:27:37 +01:00
volth
35d68ef143 treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
Yarny0
2daea2c81f hplip: retain udev rules in WithPlugin version
Beginning with commit 8ffd6af27e,
the build recipe for `hplipWithPlugin` explicitely drops a
udev rule file that is delivered with the sources.
In `hplip` (without plugin), the rule file is retained.

The udev rules takes care of uploading firmware
to certain printers (and maybe of other things),
e.g. to HP LaserJet 1000.

This commit reinstates the rule file and
expands the fixup script so that the rules
are also patched in the WithPlugin version.
2019-07-14 10:15:38 +02:00
Yarny0
5aafd1d0db hplip: udev rule: drop nohup instead of patching it
hplip's udev rule uses `nohup` to attempt to detach
its printer configuration script from the udev process.
However, this attempt is futile as udev
tracks its child processes with cgroups:
https://unix.stackexchange.com/a/243648

The hardcoded path to `nohup` was patched to use Nix' `nohup`.
This commit alters the patch script so
that it simply drops the call to `nohup`.
2019-07-14 10:15:38 +02:00
Yarny0
60311e0957 hplip: patch imageProcessor segfault in hpcups (#58949)
Beginning with version 3.18.7, `hpcups` fails with
> DEBUG: imageProcessorStartPage failed
and segfaults (tested with HP LaserJet 1000 printer).

Upstream bug reports:
* https://bugs.launchpad.net/hplip/+bug/1788706
* https://bugs.launchpad.net/hplip/+bug/1787289

There is a patch available in one of the reports:
https://bugs.launchpad.net/hplip/+bug/1787289/+attachment/5176026/+files/hplip.patch
It applies to 3.18.7, but not to later versions.

This commit adds a slight adaption of
the patch that applies to versions 3.18.9 -- 3.19.6.
The patch fixes https://github.com/NixOS/nixpkgs/issues/58949 .

Note that the patch is merely a workaround:
It simply removes all calls into the
ImageProcessor library from `HPCupsFilter.cpp`.
2019-07-14 10:15:06 +02:00
Yarny0
15aacfb450 hplip: 3.19.1 -> 3.19.6
Release notes:
https://developers.hp.com/hp-linux-imaging-and-printing/release_notes
2019-07-13 09:48:44 +02:00
Yarny0
1323930b7b hplip: add meta.downloadPage 2019-07-13 09:48:40 +02:00
Robert Djubek
9c6185f20b
hplip: add old version (from 18.09) with aarch64 support 2019-06-01 04:28:01 +00:00
Robert Djubek
e69d8844b6
hplip-3.16.11: add aarch64-linux to platforms 2019-06-01 04:28:00 +00:00
hhm0
edb323117d hplip: add missing dependency (#58515)
Graphical programs (e.g. hp-setup) error with:

error: No module named enum

This adds the enum module which fixes the error
2019-03-31 00:20:17 +01:00
Jascha Geerds
ffedc3e4a9 misc: Remove myself from list of maintainers
Unfortunately I don't have the time anymore to maintain those
packages.
2019-03-12 23:50:52 +01:00
Jaka Hudoklin
eb00ae9d21
hplip: 3.18.5 -> 3.19.1 2019-02-07 18:02:32 +01:00
John Ericson
2c2f1e37d4 reewide: Purge all uses stdenv.system and top-level system
It is deprecated and will be removed after 18.09.
2018-08-30 17:20:32 -04:00
volth
52f53c69ce pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
Raymond Gauthier
4ca2daae8f hplip: 3.18.3 -> 3.18.5
Also fixes multiples issues:

 -  broken plugins:

     -  `fax_marvell.so file is not present or symbolic link is missing`
     -  `lj.so library file doesn't have user/group execute permission.`
     -  `bb_escl.so file is not present or symbolic link is missing`

 -  multiple error during configuration phase which prevented `*.ppd`
    generation:

     -  `ppdc: Unable to find include file "<font.defs>"`
     -  patched configure time `perl` script
     -  patched use of `file`

 -  some potentially problematic filter and services:

     -  patched reference to ghost script and fonts dir in filter.
     -  patched usb configuration service.

 -  patch scripts so that they refer to valid location.

Add some options:

 -  `withStaticPPDInstall`: Install `*.ppd` files along with `*.drv`.
    When true, configure outputs: `checking for cups ppd install... yes`.
2018-06-13 21:14:10 -04:00
Ben Gamari
8a07916fa9 hplip: 3.17.11 -> 3.18.3 2018-04-29 15:19:10 -04:00
Bastian Köcher
8152db99d7 hplip: Adds missing depdency sip 2018-03-29 11:29:44 +02:00
Vladyslav M
be6d9e1e69 hplip: 3.17.10 -> 3.17.11 2018-03-12 21:48:45 +02:00
Bastian Köcher
9abc4a550f hplip: Fixes runtime errors
The following errors are fixed:
- pyqt4 not found
- hpasio for sane not found
2018-01-26 12:59:00 +01:00
Orivej Desh
fe05782a4f hplip: fix quoting for makeWrapper
Fixes #33625 after #31497
2018-01-09 00:31:38 +00:00
Thomas Tuegel
721e07ea99
hplip: 3.17.9 -> 3.17.10 2017-11-05 11:29:50 -06:00
Thomas Tuegel
a2b852caa0
hplip: change maintainers
Remove nckx and add ttuegel
2017-09-22 07:41:18 -05:00
Thomas Tuegel
ec62d5462d
hplip: 3.16.11 -> 3.17.9
hplip-3.16.11 is retained as `hplip_3_16_11`.
2017-09-22 07:41:17 -05:00
Thomas Tuegel
4c09acad5c
hplip: remove 3.15.9
hplip-3.15.9 has not been buildable in some time due to changes in CUPS.
2017-09-22 06:50:54 -05:00
Thomas Tuegel
1e2ebee42a
hplip: fix Python wrappers
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.
2017-09-20 17:03:12 -05:00
Thomas Tuegel
5ab37fb913
hplip: install PPDs where CUPS will find them 2017-09-20 14:04:55 -05:00
Tim Jäger
0c54a292fb hplip: introduce nettools dependency (#26439)
* hplip: introduce nettools dependency

Some HP printers (notably a HP MFP M477fnw) need to run `hostname` as part of
the printing process. This executable is provided by the "nettools" package.

* hplip: prepend nettools to PATH
2017-06-10 10:04:33 +01:00
Frederik Rietdijk
94eb74eaad Merge remote-tracking branch 'upstream/master' into HEAD 2017-03-21 13:04:37 +01:00
Frederik Rietdijk
3760c8c7fd Python: replace mkPythonDerivation with buildPythonPackage and format="other";
This way all Python packages use the same function,
`buildPythonPackage`.
2017-03-21 13:01:49 +01:00
Jörg Thalheim
c031adedba
hplip: 3.16.5 -> 3.16.11
fixes #24109
2017-03-20 11:18:41 +01:00
Frederik Rietdijk
d9c7a14c6a hplip: use mkPythonDerivation
since hplip is a Python package that doesn't use setuptools. Note that a
setup.py is provided, however, using buildPythonPackage fails.
2016-10-26 10:46:53 +02:00
Tobias Geerinckx-Rice
0a2f4e4d56 Merge pull request #17850 from regnat/hplip
hplip: Allow building with plugins on arm
2016-09-23 21:39:36 +02:00