about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBjørn Forsman <bjorn.forsman@gmail.com>2015-10-28 10:15:15 +0100
committerBjørn Forsman <bjorn.forsman@gmail.com>2016-05-31 09:31:41 +0200
commit65ccda5b964557190193be8a246eba1819e86561 (patch)
tree697f751730f86c7b90cc1cfe88f25c313acd99e4
parentc09bee391a966d19aae33c5a512a8d6d93912d3d (diff)
downloadnixlib-65ccda5b964557190193be8a246eba1819e86561.tar
nixlib-65ccda5b964557190193be8a246eba1819e86561.tar.gz
nixlib-65ccda5b964557190193be8a246eba1819e86561.tar.bz2
nixlib-65ccda5b964557190193be8a246eba1819e86561.tar.lz
nixlib-65ccda5b964557190193be8a246eba1819e86561.tar.xz
nixlib-65ccda5b964557190193be8a246eba1819e86561.tar.zst
nixlib-65ccda5b964557190193be8a246eba1819e86561.zip
zbar: fix camera support (enables 'zbarcam' tool)
Add Debian patches (with fetchpatch) to make things work. Among other
things, the patches port the application from V4L to V4L2.

This increases the closure size from 729 MiB to 730 MiB.
-rw-r--r--pkgs/tools/graphics/zbar/default.nix29
1 files changed, 25 insertions, 4 deletions
diff --git a/pkgs/tools/graphics/zbar/default.nix b/pkgs/tools/graphics/zbar/default.nix
index 48e3316a4a24..2751da42a4c3 100644
--- a/pkgs/tools/graphics/zbar/default.nix
+++ b/pkgs/tools/graphics/zbar/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, imagemagickBig, pkgconfig, python, pygtk, perl
-, libX11, libv4l, qt4, lzma, gtk2
+, libX11, libv4l, qt4, lzma, gtk2, fetchpatch, autoreconfHook
 }:
 
 stdenv.mkDerivation rec {
@@ -11,11 +11,32 @@ stdenv.mkDerivation rec {
     sha256 = "1imdvf5k34g1x2zr6975basczkz3zdxg6xnci50yyp5yvcwznki3";
   };
 
+  patches = [
+    (fetchpatch {
+      name = "0001-Description-Linux-2.6.38-and-later-do-not-support-th.patch";
+      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";
+      sha256 = "1zy1wdyhmpw877pv6slfhjy0c6dm0gxli0i4zs1akpvh052j4a69";
+    })
+    (fetchpatch {
+      name = "python-zbar-import-fix-am.patch";
+      url = "https://git.recluse.de/raw/debian/pkg-zbar.git/1f15f52e53ee0bf7b4761d673dc859c6b10e6be5/debian!patches!python-zbar-import-fix-am.patch";
+      sha256 = "15xx9ms137hvwpynbgvbc6zgmmzfaf7331rfhls24rgbnywbgirx";
+    })
+    (fetchpatch {
+      name = "new_autotools_build_fix.patch";
+      url = "https://git.recluse.de/raw/debian/pkg-zbar.git/2c641cc94d4f728421ed750d95d6d1c2d06a534d/debian!patches!new_autotools_build_fix.patch";
+      sha256 = "0jhl5jnnjhfdv51xqimkbkdvj8d38z05fhd11yx1sgmw82f965s3";
+    })
+    (fetchpatch {
+      name = "threading-fix.patch";
+      url = "https://git.recluse.de/raw/debian/pkg-zbar.git/d3eba6e2c3acb0758d19519015bf1a53ffb8e645/debian!patches!threading-fix.patch";
+      sha256 = "1jjgrx9nc7788vfriai4z26mm106sg5ylm2w5rdyrwx7420x1wh7";
+    })
+  ];
+
   buildInputs =
     [ imagemagickBig pkgconfig python pygtk perl libX11
-      libv4l qt4 lzma gtk2 ];
-
-  configureFlags = ["--disable-video"];
+      libv4l qt4 lzma gtk2 autoreconfHook ];
 
   meta = with stdenv.lib; {
     description = "Bar code reader";