Merge pull request #172408 from tpwrules/upgrade-aravis
aravis: 0.6.4 -> 0.8.21, add myself as maintainermain
commit
d9f2395af1
@ -1,85 +1,76 @@ |
|||||||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, gtk-doc, intltool |
{ lib |
||||||
, audit, glib, libusb1, libxml2 |
, stdenv |
||||||
, wrapGAppsHook |
, fetchFromGitHub |
||||||
, gstreamer |
, meson |
||||||
, gst-plugins-base |
, ninja |
||||||
, gst-plugins-good |
, pkg-config |
||||||
, gst-plugins-bad |
, gi-docgen |
||||||
, libnotify |
, glib |
||||||
, gnome |
, libxml2 |
||||||
|
, gobject-introspection |
||||||
|
|
||||||
|
, enableGstPlugin ? true |
||||||
|
, enableViewer ? true |
||||||
|
, gst_all_1 |
||||||
, gtk3 |
, gtk3 |
||||||
|
, wrapGAppsHook |
||||||
|
|
||||||
, enableUsb ? true |
, enableUsb ? true |
||||||
|
, libusb1 |
||||||
|
|
||||||
, enablePacketSocket ? true |
, enablePacketSocket ? true |
||||||
, enableViewer ? true |
|
||||||
, enableGstPlugin ? true |
|
||||||
, enableCppTest ? false |
|
||||||
, enableFastHeartbeat ? false |
, enableFastHeartbeat ? false |
||||||
, enableAsan ? false |
|
||||||
}: |
}: |
||||||
|
|
||||||
let |
assert enableGstPlugin -> gst_all_1 != null; |
||||||
gstreamerAtLeastVersion1 = |
assert enableViewer -> enableGstPlugin; |
||||||
lib.all |
assert enableViewer -> gtk3 != null; |
||||||
(pkg: pkg != null && lib.versionAtLeast (lib.getVersion pkg) "1.0") |
assert enableViewer -> wrapGAppsHook != null; |
||||||
[ gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad ]; |
|
||||||
in |
|
||||||
assert enableViewer -> enableGstPlugin; |
|
||||||
assert enableViewer -> gstreamerAtLeastVersion1; |
|
||||||
|
|
||||||
stdenv.mkDerivation rec { |
|
||||||
|
|
||||||
pname = "aravis"; |
|
||||||
version = "0.6.4"; |
|
||||||
|
|
||||||
src = fetchFromGitHub { |
|
||||||
owner = "AravisProject"; |
|
||||||
repo = pname; |
|
||||||
rev= "ARAVIS_${builtins.replaceStrings ["."] ["_"] version}"; |
|
||||||
sha256 = "18fnliks661kzc3g8v08hcaj18hjid8b180d6s9gwn0zgv4g374w"; |
|
||||||
}; |
|
||||||
|
|
||||||
outputs = [ "bin" "dev" "out" "lib" ]; |
stdenv.mkDerivation rec { |
||||||
|
pname = "aravis"; |
||||||
|
version = "0.8.21"; |
||||||
|
|
||||||
nativeBuildInputs = [ |
src = fetchFromGitHub { |
||||||
autoreconfHook |
owner = "AravisProject"; |
||||||
pkg-config |
repo = pname; |
||||||
intltool |
rev = version; |
||||||
gtk-doc |
sha256 = "sha256-z4fuo8tVyHf2Bw73ZfAEpAYmzbr9UIzEWPC5f95wnD8="; |
||||||
] ++ lib.optional enableViewer wrapGAppsHook; |
}; |
||||||
|
|
||||||
buildInputs = |
outputs = [ "bin" "dev" "out" "lib" ]; |
||||||
[ glib libxml2 ] |
|
||||||
++ lib.optional enableUsb libusb1 |
|
||||||
++ lib.optional enablePacketSocket audit |
|
||||||
++ lib.optionals (enableViewer || enableGstPlugin) [ gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad ] |
|
||||||
++ lib.optionals (enableViewer) [ libnotify gtk3 gnome.adwaita-icon-theme ]; |
|
||||||
|
|
||||||
preAutoreconf = "./autogen.sh"; |
nativeBuildInputs = [ |
||||||
|
meson |
||||||
|
ninja |
||||||
|
pkg-config |
||||||
|
gi-docgen |
||||||
|
] ++ lib.optional enableViewer wrapGAppsHook; |
||||||
|
|
||||||
configureFlags = |
buildInputs = |
||||||
lib.optional enableUsb "--enable-usb" |
[ glib libxml2 gobject-introspection ] |
||||||
++ lib.optional enablePacketSocket "--enable-packet-socket" |
++ lib.optional enableUsb libusb1 |
||||||
++ lib.optional enableViewer "--enable-viewer" |
++ lib.optionals (enableViewer || enableGstPlugin) (with gst_all_1; [ gstreamer gst-plugins-base (gst-plugins-good.override { gtkSupport = true; }) gst-plugins-bad ]) |
||||||
++ lib.optional enableGstPlugin |
++ lib.optionals (enableViewer) [ gtk3 ]; |
||||||
(if gstreamerAtLeastVersion1 then "--enable-gst-plugin" else "--enable-gst-0.10-plugin") |
|
||||||
++ lib.optional enableCppTest "--enable-cpp-test" |
|
||||||
++ lib.optional enableFastHeartbeat "--enable-fast-heartbeat" |
|
||||||
++ lib.optional enableAsan "--enable-asan"; |
|
||||||
|
|
||||||
postPatch = '' |
mesonFlags = [ |
||||||
ln -s ${gtk-doc}/share/gtk-doc/data/gtk-doc.make . |
] ++ 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"; |
||||||
|
|
||||||
doCheck = true; |
doCheck = true; |
||||||
|
|
||||||
meta = { |
meta = { |
||||||
description = "Library for video acquisition using GenICam cameras"; |
description = "Library for video acquisition using GenICam cameras"; |
||||||
longDescription = '' |
longDescription = '' |
||||||
Implements the gigabit ethernet and USB3 protocols used by industrial cameras. |
Implements the gigabit ethernet and USB3 protocols used by industrial cameras. |
||||||
''; |
''; |
||||||
homepage = "https://aravisproject.github.io/docs/aravis-0.5"; |
# the documentation is the best working homepage that's not the Github repo |
||||||
license = lib.licenses.lgpl2; |
homepage = "https://aravisproject.github.io/docs/aravis-0.8"; |
||||||
maintainers = []; |
license = lib.licenses.lgpl2; |
||||||
platforms = lib.platforms.unix; |
maintainers = with lib.maintainers; [ tpw_rules ]; |
||||||
}; |
platforms = lib.platforms.unix; |
||||||
} |
}; |
||||||
|
} |
||||||
|
Loading…
Reference in new issue