uvccapture: new package

"Capture image from USB webcam at a specified interval"

I apply patches from Debian to make it build with V4L2 (instead of v1
API) and fix some warnings/bugs. Source code is also downloaded from
Debian, as uvccapture homepage is unavailable.

Homepage: http://linux-uvc.berlios.de/ (seems to have vanished...)

+53
+51
pkgs/applications/video/uvccapture/default.nix
··· 1 + { stdenv, fetchurl, libjpeg }: 2 + 3 + let 4 + debianPatches = fetchurl { 5 + url = "mirror://debian/pool/main/u/uvccapture/uvccapture_0.5-3.debian.tar.gz"; 6 + sha256 = "0m29by13nw1r8sch366qzdxg5rsd1k766kqg1nj2pdb8f7pwjh9r"; 7 + }; 8 + 9 + in 10 + 11 + stdenv.mkDerivation rec { 12 + name = "uvccapture-0.5"; 13 + 14 + src = fetchurl { 15 + url = "mirror://debian/pool/main/u/uvccapture/uvccapture_0.5.orig.tar.gz"; 16 + sha256 = "1b3akkcmr3brbf93akr8xi20w8zqf2g0qfq928500wy04qi6jqpi"; 17 + }; 18 + 19 + buildInputs = [ libjpeg ]; 20 + 21 + patchPhase = '' 22 + tar xvf "${debianPatches}" 23 + for fname in debian/patches/fix_videodev_include_FTBFS.patch \ 24 + debian/patches/warnings.patch \ 25 + debian/patches/numbuffers.patch 26 + do 27 + echo "Applying patch $fname" 28 + patch < "$fname" 29 + done 30 + ''; 31 + 32 + makeFlagsArray = [ "PREFIX=$(out)/bin/" ]; 33 + 34 + preInstall = '' 35 + mkdir -p "$out/bin" 36 + ''; 37 + 38 + # Upstream has no man page, install one from Debian 39 + postInstall = '' 40 + mkdir -p "$out/share/man/man1" 41 + cp -v debian/uvccapture.1 "$out/share/man/man1/" 42 + ''; 43 + 44 + meta = with stdenv.lib; { 45 + description = "Capture image from USB webcam at a specified interval"; 46 + homepage = http://linux-uvc.berlios.de/; 47 + license = licenses.gpl2Plus; 48 + platforms = platforms.linux; 49 + maintainers = [ maintainers.bjornfor ]; 50 + }; 51 + }
+2
pkgs/top-level/all-packages.nix
··· 9847 9847 9848 9848 uucp = callPackage ../tools/misc/uucp { }; 9849 9849 9850 + uvccapture = callPackage ../applications/video/uvccapture { }; 9851 + 9850 9852 uwimap = callPackage ../tools/networking/uwimap { }; 9851 9853 9852 9854 uzbl = callPackage ../applications/networking/browsers/uzbl {