v4l_utils: 1.10.1 -> 1.12.3
Add CLI utils-only mode. Use flags instead of null's. Move to Qt 5.
This commit is contained in:
parent
74e2f482fe
commit
fda2590abb
@ -1,54 +1,50 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig
|
{ stdenv, lib, fetchurl, pkgconfig, perl, makeQtWrapper
|
||||||
, libjpeg
|
, libjpeg, udev
|
||||||
, alsaLib ? null
|
, withUtils ? true
|
||||||
, libX11 ? null
|
, withGUI ? true, alsaLib, libX11, qtbase, mesa_glu
|
||||||
, qt4 ? null # The default is set to qt4 in all-packages.nix
|
|
||||||
, qt5 ? null
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# See libv4l in all-packages.nix for the libs only (overrides alsa, libX11 & QT)
|
# See libv4l in all-packages.nix for the libs only (overrides alsa, libX11 & QT)
|
||||||
|
|
||||||
assert qt4 != null -> qt5 == null;
|
|
||||||
assert qt5 != null -> qt4 == null;
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (stdenv.lib) optional;
|
|
||||||
in
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "v4l-utils-1.10.1";
|
name = "v4l-utils-${version}";
|
||||||
|
version = "1.12.3";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://linuxtv.org/downloads/v4l-utils/${name}.tar.bz2";
|
url = "http://linuxtv.org/downloads/v4l-utils/${name}.tar.bz2";
|
||||||
sha256 = "1h1nhg5cmmzlbipak526nk4bm6d0yb217mll75f3rpg7kz1cqiv1";
|
sha256 = "0vpl3jl0x441y7b5cn7zhdsyi954hp9h2p30jhnr1zkx1rpxsiss";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags =
|
||||||
"--enable-libv4l"
|
if withUtils then [
|
||||||
] ++ (if (alsaLib != null && libX11 != null && (qt4 != null || qt5 != null)) then [
|
"--with-udevdir=\${out}/lib/udev"
|
||||||
"--with-udevdir=\${out}/lib/udev"
|
] else [
|
||||||
"--enable-v4l-utils"
|
"--disable-v4l-utils"
|
||||||
"--enable-qv4l2"
|
];
|
||||||
] else [
|
|
||||||
"--without-libudev"
|
|
||||||
"--without-udevdir"
|
|
||||||
"--disable-v4l-utils"
|
|
||||||
"--disable-qv4l2"
|
|
||||||
]);
|
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
# Create symlink for V4l1 compatibility
|
# Create symlink for V4l1 compatibility
|
||||||
ln -s "$dev/include/libv4l1-videodev.h" "$dev/include/videodev.h"
|
ln -s "$dev/include/libv4l1-videodev.h" "$dev/include/videodev.h"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig perl ] ++ lib.optional (withUtils && withGUI) makeQtWrapper;
|
||||||
|
|
||||||
buildInputs = [ alsaLib libX11 qt4 qt5 ];
|
buildInputs = [ udev ] ++ lib.optionals (withUtils && withGUI) [ alsaLib libX11 qtbase mesa_glu ];
|
||||||
|
|
||||||
propagatedBuildInputs = [ libjpeg ];
|
propagatedBuildInputs = [ libjpeg ];
|
||||||
|
|
||||||
|
NIX_CFLAGS_COMPILE = lib.optional (withUtils && withGUI) "-std=c++11";
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
patchShebangs .
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = lib.optionalString (withUtils && withGUI) ''
|
||||||
|
wrapQtProgram $out/bin/qv4l2
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "V4L utils and libv4l, provide common image formats regardless of the v4l device";
|
description = "V4L utils and libv4l, provide common image formats regardless of the v4l device";
|
||||||
homepage = http://linuxtv.org/projects.php;
|
homepage = http://linuxtv.org/projects.php;
|
||||||
|
@ -8844,10 +8844,7 @@ with pkgs;
|
|||||||
};
|
};
|
||||||
|
|
||||||
libv4l = lowPrio (v4l_utils.override {
|
libv4l = lowPrio (v4l_utils.override {
|
||||||
alsaLib = null;
|
withUtils = false;
|
||||||
libX11 = null;
|
|
||||||
qt4 = null;
|
|
||||||
qt5 = null;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
libva = callPackage ../development/libraries/libva { };
|
libva = callPackage ../development/libraries/libva { };
|
||||||
@ -12198,9 +12195,7 @@ with pkgs;
|
|||||||
systemd = null;
|
systemd = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
v4l_utils = callPackage ../os-specific/linux/v4l-utils {
|
v4l_utils = qt5.callPackage ../os-specific/linux/v4l-utils { };
|
||||||
qt5 = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
vndr = callPackage ../development/tools/vndr { };
|
vndr = callPackage ../development/tools/vndr { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user