mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-12 15:37:47 +03:00
sane-backends: generate hwdb entries for epkowa scanners correctly
without patching. Entries for these scanners are both in the doc/descriptions folder, marked as unsupported by the epson2 backend, and in the doc/descriptions-external, supported by the epkowa backend.
This commit is contained in:
parent
73de017ef2
commit
22bb14bd5d
@ -38,9 +38,6 @@ stdenv.mkDerivation {
|
|||||||
url = "https://raw.githubusercontent.com/void-linux/void-packages/4b97cd2fb4ec38712544438c2491b6d7d5ab334a/srcpkgs/sane/patches/sane-desc-cross.patch";
|
url = "https://raw.githubusercontent.com/void-linux/void-packages/4b97cd2fb4ec38712544438c2491b6d7d5ab334a/srcpkgs/sane/patches/sane-desc-cross.patch";
|
||||||
sha256 = "sha256-y6BOXnOJBSTqvRp6LwAucqaqv+OLLyhCS/tXfLpnAPI=";
|
sha256 = "sha256-y6BOXnOJBSTqvRp6LwAucqaqv+OLLyhCS/tXfLpnAPI=";
|
||||||
})
|
})
|
||||||
# generate hwdb entries for scanners handled by other backends like epkowa
|
|
||||||
# https://gitlab.com/sane-project/backends/-/issues/619
|
|
||||||
./sane-desc-generate-entries-unsupported-scanners.patch
|
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
@ -110,7 +107,7 @@ stdenv.mkDerivation {
|
|||||||
in ''
|
in ''
|
||||||
mkdir -p $out/etc/udev/rules.d/ $out/etc/udev/hwdb.d
|
mkdir -p $out/etc/udev/rules.d/ $out/etc/udev/hwdb.d
|
||||||
./tools/sane-desc -m udev+hwdb -s doc/descriptions:doc/descriptions-external > $out/etc/udev/rules.d/49-libsane.rules
|
./tools/sane-desc -m udev+hwdb -s doc/descriptions:doc/descriptions-external > $out/etc/udev/rules.d/49-libsane.rules
|
||||||
./tools/sane-desc -m udev+hwdb -s doc/descriptions -m hwdb > $out/etc/udev/hwdb.d/20-sane.hwdb
|
./tools/sane-desc -m udev+hwdb -s doc/descriptions:doc/descriptions-external -m hwdb > $out/etc/udev/hwdb.d/20-sane.hwdb
|
||||||
# the created 49-libsane references /bin/sh
|
# the created 49-libsane references /bin/sh
|
||||||
substituteInPlace $out/etc/udev/rules.d/49-libsane.rules \
|
substituteInPlace $out/etc/udev/rules.d/49-libsane.rules \
|
||||||
--replace "RUN+=\"/bin/sh" "RUN+=\"${runtimeShell}"
|
--replace "RUN+=\"/bin/sh" "RUN+=\"${runtimeShell}"
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
sane-desc does not include unsupported .desc entries like EPSON V300 PHOTO,
|
|
||||||
which can be supported by the (unfree) epkowa driver.
|
|
||||||
But we need those entries so that unprivileged users which have installed epkowa
|
|
||||||
can use the scanner.
|
|
||||||
diff --git a/tools/sane-desc.c b/tools/sane-desc.c
|
|
||||||
index 7a8645dea..9c9719fef 100644
|
|
||||||
--- a/tools/sane-desc.c
|
|
||||||
+++ b/tools/sane-desc.c
|
|
||||||
@@ -3243,10 +3243,6 @@ create_usbids_table (void)
|
|
||||||
|
|
||||||
for (model = mfg->model; model; model = model->next)
|
|
||||||
{
|
|
||||||
- if ((model->status == status_unsupported)
|
|
||||||
- || (model->status == status_unknown))
|
|
||||||
- continue;
|
|
||||||
-
|
|
||||||
if (model->usb_vendor_id && model->usb_product_id)
|
|
||||||
{
|
|
||||||
first_usbid = add_usbid (first_usbid, mfg->name,
|
|
Loading…
Reference in New Issue
Block a user