1{ stdenv, fetchFromGitHub, cmake, pkgconfig, libxml2 }:
2
3stdenv.mkDerivation rec {
4 version = "0.3.0";
5 name = "uvcdynctrl-${version}";
6
7 src = fetchFromGitHub {
8 owner = "cshorler";
9 repo = "webcam-tools";
10 rev = "bee2ef3c9e350fd859f08cd0e6745871e5f55cb9";
11 sha256 = "0s15xxgdx8lnka7vi8llbf6b0j4rhbjl6yp0qxaihysf890xj73s";
12 };
13
14 nativeBuildInputs = [ cmake pkgconfig ];
15 buildInputs = [ libxml2 ];
16
17 prePatch = ''
18 substituteInPlace uvcdynctrl/CMakeLists.txt \
19 --replace "/etc/udev" "$out/etc/udev" \
20 --replace "/lib/udev" "$out/lib/udev"
21 '';
22
23 meta = with stdenv.lib; {
24 description = "A simple interface for devices supported by the linux UVC driver";
25 homepage = http://guvcview.sourceforge.net;
26 license = licenses.gpl3Plus;
27 maintainers = [ maintainers.puffnfresh ];
28 platforms = platforms.linux;
29 };
30}