git.iko.soy/typeable/nixpkgs
on master help sign in
v4l-util: refactor & 1.0.0 -> 1.6.2 (libv4l)
466cb22codyopel
pkgs/os-specific/linux/v4l-utils/default.nix+42−13
@@ -1,26 +1,55 @@
1−{stdenv, fetchurl, which, libjpeg
1+{ stdenv, fetchurl, pkgconfig
2−, withQt4 ? false, qt4 ? null}:
2+, libjpeg
3+, alsaLib ? null
4+, libX11 ? null
5+, qt4 ? null # The default is set to qt4 in all-packages.nix
6+, qt5 ? null
7+}:
3
8
9+# See libv4l in all-packages.nix for the libs only (overrides alsa, libX11 & QT)
10+
11+assert qt4 != null -> qt5 == null;
4−assert withQt4 -> qt4 != null;
12+assert qt5 != null -> qt4 == null;
13+
14+let
15+ inherit (stdenv.lib) optional;
16+in
5
17
6stdenv.mkDerivation rec {
18stdenv.mkDerivation rec {
7− name = "v4l-utils-1.0.0";
19+ name = "v4l-utils-1.6.2";
8
20
9 src = fetchurl {
21 src = fetchurl {
10 url = "http://linuxtv.org/downloads/v4l-utils/${name}.tar.bz2";
22 url = "http://linuxtv.org/downloads/v4l-utils/${name}.tar.bz2";
11− sha256 = "0c2z500ijxr1ldzb4snasfpwi2icp04f8pk7akiqjkp0k4h8iqqx";
23+ sha256 = "0zdyjrja2mkqlijpdb4gz1vw0g7pslswmgqqsgri3yq408gypmnk";
12 };
24 };
13
25
14− buildInputs = [ which ];
26+ configureFlags = [
15− propagatedBuildInputs = [ libjpeg ] ++ stdenv.lib.optional withQt4 qt4;
27+ "--enable-libv4l"
28+ ] ++ (if (alsaLib != null && libX11 != null && (qt4 != null || qt5 != null)) then [
29+ "--with-udevdir=\${out}/lib/udev"
30+ "--enable-v4l-utils"
31+ "--enable-qv4l2"
32+ ] else [
33+ "--without-libudev"
34+ "--without-udevdir"
35+ "--disable-v4l-utils"
36+ "--disable-qv4l2"
37+ ]);
38+
39+ postInstall = ''
40+ # Create symlink for V4l1 compatibility
41+ ln -s $out/include/libv4l1-videodev.h $out/include/videodev.h
42+ '';
43+
44+ nativeBuildInputs = [ pkgconfig ];
16
45
17− preConfigure = ''configureFlags="--with-udevdir=$out/lib/udev"'';
46+ buildInputs = [ alsaLib libjpeg libX11 qt4 qt5 ];
18
47
19− meta = {
48+ meta = with stdenv.lib; {
49+ description = "V4L utils and libv4l, provide common image formats regardless of the v4l device";
20 homepage = http://linuxtv.org/projects.php;
50 homepage = http://linuxtv.org/projects.php;
21− description = "V4L utils and libv4l, that provides common image formats regardless of the v4l device";
51+ license = licenses.lgpl21Plus;
22− license = stdenv.lib.licenses.free; # The libs are of LGPLv2.1+, some other pieces are GPL.
23− maintainers = with stdenv.lib.maintainers; [viric];
52+ maintainers = with maintainers; [ codyopel viric ];
24− platforms = with stdenv.lib.platforms; linux;
53+ platforms = platforms.linux;
25 };
54 };
26}
55}
pkgs/top-level/all-packages.nix+5−2
@@ -6821,7 +6821,10 @@ let
6821 });
6821 });
6822
6822
6823 libv4l = lowPrio (v4l_utils.override {
6823 libv4l = lowPrio (v4l_utils.override {
6824− withQt4 = false;
6824+ alsaLib = null;
6825+ libX11 = null;
6826+ qt4 = null;
6827+ qt5 = null;
6825 });
6828 });
6826
6829
6827 libva = callPackage ../development/libraries/libva { };
6830 libva = callPackage ../development/libraries/libva { };
@@ -9548,7 +9551,7 @@ let
9548 });
9551 });
9549
9552
9550 v4l_utils = callPackage ../os-specific/linux/v4l-utils {
9553 v4l_utils = callPackage ../os-specific/linux/v4l-utils {
9551− withQt4 = true;
9554+ qt5 = null;
9552 };
9555 };
9553
9556
9554 windows = rec {
9557 windows = rec {