2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl, libusb-compat-0_1, libraw1394, dcraw, intltool, perl, v4l-utils }:
|
2010-10-14 11:10:45 +01:00
|
|
|
|
2015-12-30 11:22:11 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "libunicap";
|
2015-12-30 11:22:11 +00:00
|
|
|
version="0.9.12";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "https://www.unicap-imaging.org/downloads/${pname}-${version}.tar.gz";
|
2015-12-30 11:22:11 +00:00
|
|
|
sha256 = "05zcnnm4dfc6idihfi0fq5xka6x86zi89wip2ca19yz768sd33s9";
|
2010-10-14 11:10:45 +01:00
|
|
|
};
|
|
|
|
|
2020-04-28 04:29:39 +01:00
|
|
|
buildInputs = [ libusb-compat-0_1 libraw1394 dcraw intltool perl v4l-utils ];
|
2010-10-14 11:10:45 +01:00
|
|
|
|
2015-12-30 11:22:11 +00:00
|
|
|
patches = [
|
|
|
|
# Debian has a patch that fixes the build.
|
|
|
|
(fetchurl {
|
|
|
|
url = "https://sources.debian.net/data/main/u/unicap/0.9.12-2/debian/patches/1009_v4l1.patch";
|
|
|
|
sha256 = "1lgypmhdj681m7d1nmzgvh19cz8agj2f31wlnfib0ha8i3g5hg5w";
|
|
|
|
})
|
|
|
|
];
|
2010-10-14 11:10:45 +01:00
|
|
|
|
2015-12-30 11:22:11 +00:00
|
|
|
postPatch = ''
|
2010-10-14 11:10:45 +01:00
|
|
|
find . -type f -exec sed -e '/linux\/types\.h/d' -i '{}' ';'
|
|
|
|
sed -e 's@/etc/udev@'"$out"'/&@' -i data/Makefile.*
|
2015-12-30 11:22:11 +00:00
|
|
|
'';
|
2010-10-14 11:10:45 +01:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2010-10-14 11:10:45 +01:00
|
|
|
description = "Universal video capture API";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.unicap-imaging.org/";
|
2015-12-30 11:22:11 +00:00
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
2010-10-14 11:10:45 +01:00
|
|
|
};
|
2015-12-30 11:22:11 +00:00
|
|
|
}
|