Hugin segfaults if the environment variable XDG_DATA_DIR is unset
(rather than being the empty string). Upstream has committed a fix
in edfddc6070ca6d4223d359fb4b38273a5aed2f2d but has not released it
(hugin releases are *very* infrequent).
Let's cherry-pick the fix since it might be a while before they
manage another release.
Without the change build fails on hydra due to `gcc` version mix
between `opencolorio` and `djv`:
[ 51%] Linking CXX executable ../../build/bin/Render2DStressTest
...-binutils-2.39/bin/ld: ...-opencolorio-1.1.1/lib/libOpenColorIO.so:
undefined reference to `std::__throw_bad_array_new_length()@GLIBCXX_3.4.29'
ZHF: https://github.com/NixOS/nixpkgs/issues/199919
- Last upstream code change that wasn't an upstreamed fix by a Nixpkgs maintainer in 2020-03-10
- `halide` bumps usually break it
- was broken by Halide 10.0.0, initially fix upstreamed by us but according to Hydra on 2022-04-17 it broke again on Halide 10.0.0 (and it hasn't been building on Hydra since then)
- has been reported upstream as broken again on Halide 12.0.0 (2021-05-20)
- we are now on Halide 14.0.0 with no fix merged or even PR'd
- Originally introduced for `megapixels`, which has dropped support for it due to bad results & complications with its integration
- With this dependency gone, I have no personal motivation to maintain this package either
For these reasons, I'm dropping the package from Nixpkgs.
We used to ship the pre-computed udev rules that are distributed in the
tarballs. This is problematic as it changes the group of scanners to
scanner which removes the group lp and prevents cups from using it.
(https://github.com/NixOS/nixpkgs/issues/147217)
For this reason we switched to generating udev and hwdb files as follows:
./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
following what other distros do.
(https://github.com/NixOS/nixpkgs/pull/176412)
this is great, but sane-desc does not include unsupported .desc entries
like EPSON V300 PHOTO, which was present in the distributed udev rules.
So even when installing all the required unfree stuff to make the
corresponding epkowa backend work, it only works as root as there is no
corresponding hwdb entry. As the .desc entry contains the usb ids, we
can just patch sane-desc to generate hwdb entries even for unsupported
models.