1 { lib, stdenv, fetchurl, libjpeg }:
4 debianPatches = fetchurl {
5 url = "mirror://debian/pool/main/u/uvccapture/uvccapture_0.5-3.debian.tar.gz";
6 sha256 = "0m29by13nw1r8sch366qzdxg5rsd1k766kqg1nj2pdb8f7pwjh9r";
11 stdenv.mkDerivation rec {
16 url = "mirror://debian/pool/main/u/uvccapture/uvccapture_${version}.orig.tar.gz";
17 sha256 = "1b3akkcmr3brbf93akr8xi20w8zqf2g0qfq928500wy04qi6jqpi";
20 buildInputs = [ libjpeg ];
23 tar xvf "${debianPatches}"
24 for fname in debian/patches/fix_videodev_include_FTBFS.patch \
25 debian/patches/warnings.patch \
26 debian/patches/numbuffers.patch
28 echo "Applying patch $fname"
33 makeFlagsArray = [ "PREFIX=$(out)/bin/" ];
39 # Upstream has no man page, install one from Debian
41 mkdir -p "$out/share/man/man1"
42 cp -v debian/uvccapture.1 "$out/share/man/man1/"
46 description = "Capture image from USB webcam at a specified interval";
47 license = licenses.gpl2Plus;
48 platforms = platforms.linux;
49 maintainers = [ maintainers.bjornfor ];