@@ -1,5 +1,5 @@
11{ stdenv, fetchurl, imagemagickBig, pkgconfig, python, pygtk, perl
2−, libX11, libv4l, qt4, lzma, gtk2
2+, libX11, libv4l, qt4, lzma, gtk2, fetchpatch, autoreconfHook
33}:
44
55stdenv.mkDerivation rec {
@@ -11,11 +11,32 @@ stdenv.mkDerivation rec {
1111 sha256 = "1imdvf5k34g1x2zr6975basczkz3zdxg6xnci50yyp5yvcwznki3";
1212 };
1313
14+ patches = [
15+ (fetchpatch {
16+ name = "0001-Description-Linux-2.6.38-and-later-do-not-support-th.patch";
17+ url = "https://git.recluse.de/raw/debian/pkg-zbar.git/35182c3ac2430c986579b25f1826fe1b7dfd15de/debian!patches!0001-Description-Linux-2.6.38-and-later-do-not-support-th.patch";
18+ sha256 = "1zy1wdyhmpw877pv6slfhjy0c6dm0gxli0i4zs1akpvh052j4a69";
19+ })
20+ (fetchpatch {
21+ name = "python-zbar-import-fix-am.patch";
22+ url = "https://git.recluse.de/raw/debian/pkg-zbar.git/1f15f52e53ee0bf7b4761d673dc859c6b10e6be5/debian!patches!python-zbar-import-fix-am.patch";
23+ sha256 = "15xx9ms137hvwpynbgvbc6zgmmzfaf7331rfhls24rgbnywbgirx";
24+ })
25+ (fetchpatch {
26+ name = "new_autotools_build_fix.patch";
27+ url = "https://git.recluse.de/raw/debian/pkg-zbar.git/2c641cc94d4f728421ed750d95d6d1c2d06a534d/debian!patches!new_autotools_build_fix.patch";
28+ sha256 = "0jhl5jnnjhfdv51xqimkbkdvj8d38z05fhd11yx1sgmw82f965s3";
29+ })
30+ (fetchpatch {
31+ name = "threading-fix.patch";
32+ url = "https://git.recluse.de/raw/debian/pkg-zbar.git/d3eba6e2c3acb0758d19519015bf1a53ffb8e645/debian!patches!threading-fix.patch";
33+ sha256 = "1jjgrx9nc7788vfriai4z26mm106sg5ylm2w5rdyrwx7420x1wh7";
34+ })
35+ ];
36+
1437 buildInputs =
1538 [ imagemagickBig pkgconfig python pygtk perl libX11
16− libv4l qt4 lzma gtk2 ];
17−
18− configureFlags = ["--disable-video"];
39+ libv4l qt4 lzma gtk2 autoreconfHook ];
1940
2041 meta = with stdenv.lib; {
2142 description = "Bar code reader";