Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, libusb-compat-0_1, libraw1394, dcraw, intltool, perl, v4l-utils }: 2 3stdenv.mkDerivation rec { 4 pname = "libunicap"; 5 version="0.9.12"; 6 7 src = fetchurl { 8 url = "https://www.unicap-imaging.org/downloads/${pname}-${version}.tar.gz"; 9 sha256 = "05zcnnm4dfc6idihfi0fq5xka6x86zi89wip2ca19yz768sd33s9"; 10 }; 11 12 nativeBuildInputs = [ intltool ]; 13 buildInputs = [ libusb-compat-0_1 libraw1394 dcraw perl v4l-utils ]; 14 15 patches = [ 16 # Debian has a patch that fixes the build. 17 (fetchurl { 18 url = "https://sources.debian.net/data/main/u/unicap/0.9.12-2/debian/patches/1009_v4l1.patch"; 19 sha256 = "1lgypmhdj681m7d1nmzgvh19cz8agj2f31wlnfib0ha8i3g5hg5w"; 20 }) 21 ]; 22 23 postPatch = '' 24 find . -type f -exec sed -e '/linux\/types\.h/d' -i '{}' ';' 25 sed -e 's@/etc/udev@'"$out"'/&@' -i data/Makefile.* 26 ''; 27 28 meta = with lib; { 29 description = "Universal video capture API"; 30 homepage = "http://www.unicap-imaging.org/"; 31 maintainers = [ maintainers.raskin ]; 32 license = licenses.gpl2Plus; 33 platforms = platforms.linux; 34 }; 35}