20 gobject-introspection,
30 withAravisUsbVision ? withAravis,
35 stdenv.mkDerivation rec {
39 src = fetchFromGitHub {
40 owner = "TheImagingSource";
42 rev = "v-tiscamera-${version}";
43 hash = "sha256-33U/8CbqNWIRwfDHXCZSN466WEQj9fip+Z5EJ7kIwRM=";
47 cp ${catch2}/include/catch2/catch.hpp external/catch/catch.hpp
49 substituteInPlace ./data/udev/80-theimagingsource-cameras.rules.in \
50 --replace "/bin/sh" "${runtimeShell}/bin/sh" \
51 --replace "typically /usr/bin/" "" \
52 --replace "typically /usr/share/theimagingsource/tiscamera/uvc-extension/" ""
62 ++ lib.optionals withDoc [
66 ++ lib.optionals withAravis [
69 ++ lib.optionals withGui [
87 gst_all_1.gst-plugins-base
88 gst_all_1.gst-plugins-good
89 gst_all_1.gst-plugins-bad
90 gst_all_1.gst-plugins-ugly
92 ++ lib.optionals withAravis [
95 ++ lib.optionals withGui [
99 hardeningDisable = [ "format" ];
102 "-DTCAM_BUILD_GST_1_0=ON"
103 "-DTCAM_BUILD_TOOLS=ON"
104 "-DTCAM_BUILD_V4L2=ON"
105 "-DTCAM_BUILD_LIBUSB=ON"
106 "-DTCAM_BUILD_TESTS=ON"
107 "-DTCAM_BUILD_ARAVIS=${if withAravis then "ON" else "OFF"}"
108 "-DTCAM_BUILD_DOCUMENTATION=${if withDoc then "ON" else "OFF"}"
109 "-DTCAM_BUILD_WITH_GUI=${if withGui then "ON" else "OFF"}"
110 "-DTCAM_DOWNLOAD_MESON=OFF"
111 "-DTCAM_INTERNAL_ARAVIS=OFF"
112 "-DTCAM_ARAVIS_USB_VISION=${if withAravis && withAravisUsbVision then "ON" else "OFF"}"
113 "-DTCAM_INSTALL_FORCE_PREFIX=ON"
116 env.CXXFLAGS = "-include cstdint";
120 # gstreamer tests requires, besides gst-plugins-bad, plugins installed by this expression.
121 checkPhase = "ctest --force-new-ctest-process -E gstreamer";
123 # wrapGAppsHook3: make sure we add ourselves to the introspection
124 # and gstreamer paths.
125 GI_TYPELIB_PATH = "${placeholder "out"}/lib/girepository-1.0";
126 GST_PLUGIN_SYSTEM_PATH_1_0 = "${placeholder "out"}/lib/gstreamer-1.0";
128 QT_PLUGIN_PATH = lib.optionalString withGui "${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}";
130 dontWrapQtApps = true;
133 gappsWrapperArgs+=("''${qtWrapperArgs[@]}")
137 description = "Linux sources and UVC firmwares for The Imaging Source cameras";
138 homepage = "https://github.com/TheImagingSource/tiscamera";
139 license = with licenses; [ asl20 ];
140 platforms = platforms.linux;
141 maintainers = with maintainers; [ jraygauthier ];