at 23.11-beta 77 lines 2.0 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, meson 5, ninja 6, pkg-config 7, gi-docgen 8, glib 9, libxml2 10, gobject-introspection 11 12, enableGstPlugin ? true 13, enableViewer ? true 14, gst_all_1 15, gtk3 16, wrapGAppsHook 17 18, enableUsb ? true 19, libusb1 20 21, enablePacketSocket ? true 22, enableFastHeartbeat ? false 23}: 24 25assert enableGstPlugin -> gst_all_1 != null; 26assert enableViewer -> enableGstPlugin; 27assert enableViewer -> gtk3 != null; 28assert enableViewer -> wrapGAppsHook != null; 29 30stdenv.mkDerivation rec { 31 pname = "aravis"; 32 version = "0.8.30"; 33 34 src = fetchFromGitHub { 35 owner = "AravisProject"; 36 repo = pname; 37 rev = version; 38 sha256 = "sha256-1OxvLpzEKxIXiLJIUr+hCx+sxnH9Z5dBM5Lug1acCok="; 39 }; 40 41 outputs = [ "bin" "dev" "out" "lib" ]; 42 43 nativeBuildInputs = [ 44 meson 45 ninja 46 pkg-config 47 gi-docgen 48 gobject-introspection 49 ] ++ lib.optional enableViewer wrapGAppsHook; 50 51 buildInputs = 52 [ glib libxml2 ] 53 ++ lib.optional enableUsb libusb1 54 ++ lib.optionals (enableViewer || enableGstPlugin) (with gst_all_1; [ gstreamer gst-plugins-base (gst-plugins-good.override { gtkSupport = true; }) gst-plugins-bad ]) 55 ++ lib.optionals (enableViewer) [ gtk3 ]; 56 57 mesonFlags = [ 58 ] ++ lib.optional enableFastHeartbeat "-Dfast-heartbeat=enabled" 59 ++ lib.optional (!enableGstPlugin) "-Dgst-plugin=disabled" 60 ++ lib.optional (!enableViewer) "-Dviewer=disabled" 61 ++ lib.optional (!enableUsb) "-Dviewer=disabled" 62 ++ lib.optional (!enablePacketSocket) "-Dpacket-socket=disabled"; 63 64 doCheck = true; 65 66 meta = { 67 description = "Library for video acquisition using GenICam cameras"; 68 longDescription = '' 69 Implements the gigabit ethernet and USB3 protocols used by industrial cameras. 70 ''; 71 # the documentation is the best working homepage that's not the Github repo 72 homepage = "https://aravisproject.github.io/docs/aravis-0.8"; 73 license = lib.licenses.lgpl2; 74 maintainers = with lib.maintainers; [ tpw_rules ]; 75 platforms = lib.platforms.unix; 76 }; 77}