2022-05-18 14:49:53 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, gi-docgen
|
|
|
|
, glib
|
|
|
|
, libxml2
|
|
|
|
, gobject-introspection
|
|
|
|
|
|
|
|
, enableGstPlugin ? true
|
|
|
|
, enableViewer ? true
|
|
|
|
, gst_all_1
|
|
|
|
, gtk3
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2022-05-18 14:49:53 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
, enableUsb ? true
|
2022-05-18 14:49:53 +00:00
|
|
|
, libusb1
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
, enablePacketSocket ? true
|
|
|
|
, enableFastHeartbeat ? false
|
|
|
|
}:
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
assert enableGstPlugin -> gst_all_1 != null;
|
|
|
|
assert enableViewer -> enableGstPlugin;
|
|
|
|
assert enableViewer -> gtk3 != null;
|
2024-05-15 15:35:15 +00:00
|
|
|
assert enableViewer -> wrapGAppsHook3 != null;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "aravis";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.8.31";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "AravisProject";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-CsXnwrZqBCS7JVAB/7JlAAvks5HnYxgrdc4Bmg68QdE=";
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
outputs = [ "bin" "dev" "out" "lib" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
gi-docgen
|
2023-08-10 07:59:29 +00:00
|
|
|
gobject-introspection
|
2024-05-15 15:35:15 +00:00
|
|
|
] ++ lib.optional enableViewer wrapGAppsHook3;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
buildInputs =
|
2023-08-10 07:59:29 +00:00
|
|
|
[ glib libxml2 ]
|
2022-05-18 14:49:53 +00:00
|
|
|
++ lib.optional enableUsb libusb1
|
|
|
|
++ lib.optionals (enableViewer || enableGstPlugin) (with gst_all_1; [ gstreamer gst-plugins-base (gst-plugins-good.override { gtkSupport = true; }) gst-plugins-bad ])
|
|
|
|
++ lib.optionals (enableViewer) [ gtk3 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
mesonFlags = [
|
|
|
|
] ++ lib.optional enableFastHeartbeat "-Dfast-heartbeat=enabled"
|
|
|
|
++ lib.optional (!enableGstPlugin) "-Dgst-plugin=disabled"
|
|
|
|
++ lib.optional (!enableViewer) "-Dviewer=disabled"
|
|
|
|
++ lib.optional (!enableUsb) "-Dviewer=disabled"
|
|
|
|
++ lib.optional (!enablePacketSocket) "-Dpacket-socket=disabled";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
doCheck = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
meta = {
|
|
|
|
description = "Library for video acquisition using GenICam cameras";
|
|
|
|
longDescription = ''
|
|
|
|
Implements the gigabit ethernet and USB3 protocols used by industrial cameras.
|
|
|
|
'';
|
|
|
|
# the documentation is the best working homepage that's not the Github repo
|
|
|
|
homepage = "https://aravisproject.github.io/docs/aravis-0.8";
|
|
|
|
license = lib.licenses.lgpl2;
|
|
|
|
maintainers = with lib.maintainers; [ tpw_rules ];
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
};
|
|
|
|
}
|