summary refs log tree commit diff
path: root/pkgs/os-specific/linux/uvcdynctrl/default.nix
blob: 19f59d0068064f62031766fb0265caafb2a34e13 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ stdenv, fetchFromGitHub, cmake, pkgconfig, libxml2 }:

stdenv.mkDerivation rec {
  version = "0.3.0";
  pname = "uvcdynctrl";

  src = fetchFromGitHub {
    owner = "cshorler";
    repo = "webcam-tools";
    rev = "bee2ef3c9e350fd859f08cd0e6745871e5f55cb9";
    sha256 = "0s15xxgdx8lnka7vi8llbf6b0j4rhbjl6yp0qxaihysf890xj73s";
  };

  nativeBuildInputs = [ cmake pkgconfig ];
  buildInputs = [ libxml2 ];

  prePatch = ''
    substituteInPlace uvcdynctrl/CMakeLists.txt \
      --replace "/etc/udev" "$out/etc/udev" \
      --replace "/lib/udev" "$out/lib/udev"
  '';

  meta = with stdenv.lib; {
    description = "A simple interface for devices supported by the linux UVC driver";
    homepage = http://guvcview.sourceforge.net;
    license = licenses.gpl3Plus;
    maintainers = [ maintainers.puffnfresh ];
    platforms = platforms.linux;
  };
}