git.iko.soy/typeable/nixpkgs
on master help sign in
v4l-util: refactor & 1.0.0 -> 1.6.2 (libv4l)

+ added missing dependencies (alsa, libXll & qt5) + added fixes to make sure unnecessary features are disabled for libv4l

commit466cb22bcd06ddf57b76e93f992957443ea313b4 authorcodyopel <codyopel@gmail.com> dateSun 5 Apr 2015, 16:23 (12 years ago) parentbb18faf
2 files changed+47−15
pkgs/os-specific/linux/v4l-utils/default.nix+42−13 pkgs/top-level/all-packages.nix+5−2
pkgs/os-specific/linux/v4l-utils/default.nix+42−13
@@ -1,26 +1,55 @@
1−{stdenv, fetchurl, which, libjpeg
2−, withQt4 ? false, qt4 ? null}:
1+{ stdenv, fetchurl, pkgconfig
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+}:
38
4−assert withQt4 -> qt4 != null;
9+# See libv4l in all-packages.nix for the libs only (overrides alsa, libX11 & QT)
10+
11+assert qt4 != null -> qt5 == null;
12+assert qt5 != null -> qt4 == null;
13+
14+let
15+ inherit (stdenv.lib) optional;
16+in
517
618stdenv.mkDerivation rec {
7− name = "v4l-utils-1.0.0";
19+ name = "v4l-utils-1.6.2";
820
921 src = fetchurl {
1022 url = "http://linuxtv.org/downloads/v4l-utils/${name}.tar.bz2";
11− sha256 = "0c2z500ijxr1ldzb4snasfpwi2icp04f8pk7akiqjkp0k4h8iqqx";
23+ sha256 = "0zdyjrja2mkqlijpdb4gz1vw0g7pslswmgqqsgri3yq408gypmnk";
1224 };
1325
14− buildInputs = [ which ];
15− propagatedBuildInputs = [ libjpeg ] ++ stdenv.lib.optional withQt4 qt4;
26+ configureFlags = [
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 ];
1645
17− preConfigure = ''configureFlags="--with-udevdir=$out/lib/udev"'';
46+ buildInputs = [ alsaLib libjpeg libX11 qt4 qt5 ];
1847
19− meta = {
48+ meta = with stdenv.lib; {
49+ description = "V4L utils and libv4l, provide common image formats regardless of the v4l device";
2050 homepage = http://linuxtv.org/projects.php;
21− description = "V4L utils and libv4l, that provides common image formats regardless of the v4l device";
22− license = stdenv.lib.licenses.free; # The libs are of LGPLv2.1+, some other pieces are GPL.
23− maintainers = with stdenv.lib.maintainers; [viric];
24− platforms = with stdenv.lib.platforms; linux;
51+ license = licenses.lgpl21Plus;
52+ maintainers = with maintainers; [ codyopel viric ];
53+ platforms = platforms.linux;
2554 };
2655}
pkgs/top-level/all-packages.nix+5−2
@@ -6821,7 +6821,10 @@ let
68216821 });
68226822
68236823 libv4l = lowPrio (v4l_utils.override {
6824− withQt4 = false;
6824+ alsaLib = null;
6825+ libX11 = null;
6826+ qt4 = null;
6827+ qt5 = null;
68256828 });
68266829
68276830 libva = callPackage ../development/libraries/libva { };
@@ -9548,7 +9551,7 @@ let
95489551 });
95499552
95509553 v4l_utils = callPackage ../os-specific/linux/v4l-utils {
9551− withQt4 = true;
9554+ qt5 = null;
95529555 };
95539556
95549557 windows = rec {