2018-08-17 17:11:40 +01:00
|
|
|
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, gtk-doc, intltool
|
|
|
|
, audit, glib, libusb, libxml2
|
|
|
|
, wrapGAppsHook
|
|
|
|
, gstreamer ? null
|
|
|
|
, gst-plugins-base ? null
|
|
|
|
, gst-plugins-good ? null
|
|
|
|
, gst-plugins-bad ? null
|
|
|
|
, libnotify ? null
|
|
|
|
, gnome3 ? null
|
2019-03-23 04:50:12 +00:00
|
|
|
, gtk3 ? null
|
2018-08-17 17:11:40 +01:00
|
|
|
, enableUsb ? true
|
|
|
|
, enablePacketSocket ? true
|
|
|
|
, enableViewer ? true
|
|
|
|
, enableGstPlugin ? true
|
|
|
|
, enableCppTest ? false
|
|
|
|
, enableFastHeartbeat ? false
|
|
|
|
, enableAsan ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
gstreamerAtLeastVersion1 =
|
|
|
|
stdenv.lib.all
|
|
|
|
(pkg: pkg != null && stdenv.lib.versionAtLeast (stdenv.lib.getVersion pkg) "1.0")
|
|
|
|
[ gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad ];
|
|
|
|
in
|
|
|
|
assert enableGstPlugin -> stdenv.lib.all (pkg: pkg != null) [ gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad ];
|
|
|
|
assert enableViewer -> enableGstPlugin;
|
|
|
|
assert enableViewer -> libnotify != null;
|
|
|
|
assert enableViewer -> gnome3 != null;
|
2019-03-23 04:50:12 +00:00
|
|
|
assert enableViewer -> gtk3 != null;
|
2018-08-17 17:11:40 +01:00
|
|
|
assert enableViewer -> gstreamerAtLeastVersion1;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
|
|
|
pname = "aravis";
|
2019-09-26 05:31:24 +01:00
|
|
|
version = "0.6.4";
|
2018-08-17 17:11:40 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "AravisProject";
|
2019-03-21 14:15:47 +00:00
|
|
|
repo = pname;
|
|
|
|
rev= "ARAVIS_${builtins.replaceStrings ["."] ["_"] version}";
|
2019-09-26 05:31:24 +01:00
|
|
|
sha256 = "18fnliks661kzc3g8v08hcaj18hjid8b180d6s9gwn0zgv4g374w";
|
2018-08-17 17:11:40 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "bin" "dev" "out" "lib" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
pkgconfig
|
|
|
|
intltool
|
|
|
|
gtk-doc
|
|
|
|
] ++ stdenv.lib.optional enableViewer wrapGAppsHook;
|
|
|
|
|
|
|
|
buildInputs =
|
|
|
|
[ glib libxml2 ]
|
|
|
|
++ stdenv.lib.optional enableUsb libusb
|
|
|
|
++ stdenv.lib.optional enablePacketSocket audit
|
|
|
|
++ stdenv.lib.optionals (enableViewer || enableGstPlugin) [ gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad ]
|
2019-03-23 04:50:12 +00:00
|
|
|
++ stdenv.lib.optionals (enableViewer) [ libnotify gtk3 gnome3.adwaita-icon-theme ];
|
2018-08-17 17:11:40 +01:00
|
|
|
|
|
|
|
preAutoreconf = ''./autogen.sh'';
|
|
|
|
|
|
|
|
configureFlags =
|
|
|
|
stdenv.lib.optional enableUsb "--enable-usb"
|
|
|
|
++ stdenv.lib.optional enablePacketSocket "--enable-packet-socket"
|
|
|
|
++ stdenv.lib.optional enableViewer "--enable-viewer"
|
|
|
|
++ stdenv.lib.optional enableGstPlugin
|
|
|
|
(if gstreamerAtLeastVersion1 then "--enable-gst-plugin" else "--enable-gst-0.10-plugin")
|
|
|
|
++ stdenv.lib.optional enableCppTest "--enable-cpp-test"
|
|
|
|
++ stdenv.lib.optional enableFastHeartbeat "--enable-fast-heartbeat"
|
|
|
|
++ stdenv.lib.optional enableAsan "--enable-asan";
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
ln -s ${gtk-doc}/share/gtk-doc/data/gtk-doc.make .
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Library for video acquisition using GenICam cameras";
|
|
|
|
longDescription = ''
|
|
|
|
Implements the gigabit ethernet and USB3 protocols used by industrial cameras.
|
|
|
|
'';
|
2019-03-21 14:15:47 +00:00
|
|
|
homepage = "https://aravisproject.github.io/docs/aravis-0.5";
|
2018-08-17 17:11:40 +01:00
|
|
|
license = stdenv.lib.licenses.lgpl2;
|
|
|
|
maintainers = [];
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|