Merge pull request #291668 from symphorien/sane_epkowa_hwdb

sane-backends: generate hwdb entries for epkowa scanners correctly

authored by Guillaume Girol and committed by GitHub 4323d8b6 7c696d12

+1 -23
+1 -4
pkgs/applications/graphics/sane/backends/default.nix
··· 38 url = "https://raw.githubusercontent.com/void-linux/void-packages/4b97cd2fb4ec38712544438c2491b6d7d5ab334a/srcpkgs/sane/patches/sane-desc-cross.patch"; 39 sha256 = "sha256-y6BOXnOJBSTqvRp6LwAucqaqv+OLLyhCS/tXfLpnAPI="; 40 }) 41 - # generate hwdb entries for scanners handled by other backends like epkowa 42 - # https://gitlab.com/sane-project/backends/-/issues/619 43 - ./sane-desc-generate-entries-unsupported-scanners.patch 44 ]; 45 46 postPatch = '' ··· 110 in '' 111 mkdir -p $out/etc/udev/rules.d/ $out/etc/udev/hwdb.d 112 ./tools/sane-desc -m udev+hwdb -s doc/descriptions:doc/descriptions-external > $out/etc/udev/rules.d/49-libsane.rules 113 - ./tools/sane-desc -m udev+hwdb -s doc/descriptions -m hwdb > $out/etc/udev/hwdb.d/20-sane.hwdb 114 # the created 49-libsane references /bin/sh 115 substituteInPlace $out/etc/udev/rules.d/49-libsane.rules \ 116 --replace "RUN+=\"/bin/sh" "RUN+=\"${runtimeShell}"
··· 38 url = "https://raw.githubusercontent.com/void-linux/void-packages/4b97cd2fb4ec38712544438c2491b6d7d5ab334a/srcpkgs/sane/patches/sane-desc-cross.patch"; 39 sha256 = "sha256-y6BOXnOJBSTqvRp6LwAucqaqv+OLLyhCS/tXfLpnAPI="; 40 }) 41 ]; 42 43 postPatch = '' ··· 107 in '' 108 mkdir -p $out/etc/udev/rules.d/ $out/etc/udev/hwdb.d 109 ./tools/sane-desc -m udev+hwdb -s doc/descriptions:doc/descriptions-external > $out/etc/udev/rules.d/49-libsane.rules 110 + ./tools/sane-desc -m udev+hwdb -s doc/descriptions:doc/descriptions-external -m hwdb > $out/etc/udev/hwdb.d/20-sane.hwdb 111 # the created 49-libsane references /bin/sh 112 substituteInPlace $out/etc/udev/rules.d/49-libsane.rules \ 113 --replace "RUN+=\"/bin/sh" "RUN+=\"${runtimeShell}"
-19
pkgs/applications/graphics/sane/backends/sane-desc-generate-entries-unsupported-scanners.patch
··· 1 - sane-desc does not include unsupported .desc entries like EPSON V300 PHOTO, 2 - which can be supported by the (unfree) epkowa driver. 3 - But we need those entries so that unprivileged users which have installed epkowa 4 - can use the scanner. 5 - diff --git a/tools/sane-desc.c b/tools/sane-desc.c 6 - index 7a8645dea..9c9719fef 100644 7 - --- a/tools/sane-desc.c 8 - +++ b/tools/sane-desc.c 9 - @@ -3243,10 +3243,6 @@ create_usbids_table (void) 10 - 11 - for (model = mfg->model; model; model = model->next) 12 - { 13 - - if ((model->status == status_unsupported) 14 - - || (model->status == status_unknown)) 15 - - continue; 16 - - 17 - if (model->usb_vendor_id && model->usb_product_id) 18 - { 19 - first_usbid = add_usbid (first_usbid, mfg->name,
···