tiscamera: 0.13.1 -> 1.0.0

+199 -41
+25
pkgs/os-specific/linux/tiscamera/0001-cmake-find-aravis-fix-pkg-cfg-include-dirs.patch
···
··· 1 + From 90b540bd135de2587352719b14c385b20aa572be Mon Sep 17 00:00:00 2001 2 + From: Raymond Gauthier <jraygauthier@gmail.com> 3 + Date: Wed, 15 Jun 2022 16:09:58 -0400 4 + Subject: [PATCH] cmake-find-aravis: fix pkg cfg include dirs 5 + 6 + --- 7 + cmake/modules/FindAravis.cmake | 2 +- 8 + 1 file changed, 1 insertion(+), 1 deletion(-) 9 + 10 + diff --git a/cmake/modules/FindAravis.cmake b/cmake/modules/FindAravis.cmake 11 + index 5dab5431..811302b9 100644 12 + --- a/cmake/modules/FindAravis.cmake 13 + +++ b/cmake/modules/FindAravis.cmake 14 + @@ -20,7 +20,7 @@ find_path(aravis_INCLUDE_DIR 15 + arv.h 16 + PATHS 17 + ${aravis_PKGCONF_INCLUDE_DIRS} 18 + - ${aravis0_6_PKGCONF_INCLUDE_DIRS} 19 + + ${aravis0_8_PKGCONF_INCLUDE_DIRS} 20 + /usr/local/include 21 + # /usr/local/include/aravis-0.4 22 + /usr/local/include/aravis-0.8 23 + -- 24 + 2.31.1 25 +
+70
pkgs/os-specific/linux/tiscamera/0001-tcamconvert-tcamsrc-add-missing-include-lib-dirs.patch
···
··· 1 + From 5e7146e176cb1b01b47d16a66763469dccd87f25 Mon Sep 17 00:00:00 2001 2 + From: Raymond Gauthier <jraygauthier@gmail.com> 3 + Date: Thu, 9 Jun 2022 19:45:30 -0400 4 + Subject: [PATCH] tcamconvert&tcamsrc: add missing include/lib dirs 5 + 6 + These were building libraries with dependencies on gstreamer-video 7 + and gstreamer-base but weren't adding the proper include and 8 + lib directories which resulted in build failure on systems 9 + where video and base aren't installed in the same location 10 + as gstreamer itself (e.g: nix, nixos). 11 + --- 12 + src/gstreamer-1.0/tcamconvert/CMakeLists.txt | 2 ++ 13 + src/gstreamer-1.0/tcamsrc/CMakeLists.txt | 11 +++++++++++ 14 + 2 files changed, 13 insertions(+) 15 + 16 + diff --git a/src/gstreamer-1.0/tcamconvert/CMakeLists.txt b/src/gstreamer-1.0/tcamconvert/CMakeLists.txt 17 + index 30563c38..066cb5d7 100644 18 + --- a/src/gstreamer-1.0/tcamconvert/CMakeLists.txt 19 + +++ b/src/gstreamer-1.0/tcamconvert/CMakeLists.txt 20 + @@ -28,6 +28,8 @@ add_library(tcamconvert SHARED 21 + target_include_directories(tcamconvert 22 + PRIVATE 23 + ${GSTREAMER_INCLUDE_DIRS} 24 + + ${GSTREAMER_BASE_INCLUDE_DIRS} 25 + + ${GSTREAMER_VIDEO_INCLUDE_DIRS} 26 + ) 27 + 28 + set_project_warnings(tcamconvert) 29 + diff --git a/src/gstreamer-1.0/tcamsrc/CMakeLists.txt b/src/gstreamer-1.0/tcamsrc/CMakeLists.txt 30 + index 3bc7ed97..ed5be37f 100644 31 + --- a/src/gstreamer-1.0/tcamsrc/CMakeLists.txt 32 + +++ b/src/gstreamer-1.0/tcamsrc/CMakeLists.txt 33 + @@ -21,12 +21,15 @@ add_library(gsttcamstatistics SHARED 34 + target_include_directories(gsttcamstatistics 35 + PRIVATE 36 + ${GSTREAMER_INCLUDE_DIRS} 37 + + ${GSTREAMER_BASE_INCLUDE_DIRS} 38 + + ${GSTREAMER_VIDEO_INCLUDE_DIRS} 39 + ) 40 + 41 + target_link_libraries( gsttcamstatistics 42 + PRIVATE 43 + ${GSTREAMER_LIBRARIES} 44 + ${GSTREAMER_BASE_LIBRARIES} 45 + + ${GSTREAMER_VIDEO_LIBRARIES} 46 + ) 47 + 48 + 49 + @@ -53,10 +56,18 @@ add_library(gsttcamsrc SHARED 50 + tcambind.cpp 51 + ) 52 + 53 + + target_include_directories(gsttcamsrc 54 + + PRIVATE 55 + + ${GSTREAMER_INCLUDE_DIRS} 56 + + ${GSTREAMER_BASE_INCLUDE_DIRS} 57 + + ${GSTREAMER_VIDEO_INCLUDE_DIRS} 58 + + ) 59 + + 60 + target_link_libraries( gsttcamsrc 61 + PRIVATE 62 + ${GSTREAMER_LIBRARIES} 63 + ${GSTREAMER_BASE_LIBRARIES} 64 + + ${GSTREAMER_VIDEO_LIBRARIES} 65 + 66 + tcamgstbase 67 + tcam::gst-helper 68 + -- 69 + 2.31.1 70 +
+25
pkgs/os-specific/linux/tiscamera/0001-udev-rules-fix-install-location.patch
···
··· 1 + From fdbc0b74812b9afd663226715375b5688e5408b5 Mon Sep 17 00:00:00 2001 2 + From: Raymond Gauthier <jraygauthier@gmail.com> 3 + Date: Thu, 9 Jun 2022 20:23:02 -0400 4 + Subject: [PATCH] udev/rules: fix install location 5 + 6 + --- 7 + CMakeInstall.cmake | 2 +- 8 + 1 file changed, 1 insertion(+), 1 deletion(-) 9 + 10 + diff --git a/CMakeInstall.cmake b/CMakeInstall.cmake 11 + index 4773091f..962c9b09 100644 12 + --- a/CMakeInstall.cmake 13 + +++ b/CMakeInstall.cmake 14 + @@ -92,7 +92,7 @@ else() 15 + 16 + else() 17 + 18 + - set(TCAM_INSTALL_UDEV "${CMAKE_INSTALL_PREFIX}/udev/rules.d" CACHE PATH "udev rules installation path" FORCE) 19 + + set(TCAM_INSTALL_UDEV "${CMAKE_INSTALL_PREFIX}/lib/udev/rules.d" CACHE PATH "udev rules installation path" FORCE) 20 + set(TCAM_INSTALL_SYSTEMD "${CMAKE_INSTALL_PREFIX}/lib/systemd/system/" CACHE PATH "systemd unit installation path" FORCE) 21 + 22 + set(TCAM_INSTALL_PKGCONFIG "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig" CACHE PATH "pkgconfig installation path" FORCE) 23 + -- 24 + 2.31.1 25 +
+78 -40
pkgs/os-specific/linux/tiscamera/default.nix
··· 3 , fetchFromGitHub 4 , cmake 5 , pkg-config 6 - , pcre 7 - , tinyxml 8 , libusb1 9 , libzip 10 , glib 11 , gobject-introspection 12 , gst_all_1 13 - , libwebcam 14 - , libunwind 15 - , elfutils 16 - , orc 17 - , python3Packages 18 - , libuuid 19 , wrapGAppsHook 20 - , catch2 21 }: 22 23 stdenv.mkDerivation rec { 24 pname = "tiscamera"; 25 - version = "0.13.1"; 26 27 src = fetchFromGitHub { 28 owner = "TheImagingSource"; 29 repo = pname; 30 rev = "v-${pname}-${version}"; 31 - sha256 = "0hpy9yhc4mn6w8gvzwif703smmcys0j2jqbz2xfghqxcyb0ykplj"; 32 }; 33 34 postPatch = '' 35 cp ${catch2}/include/catch2/catch.hpp external/catch/catch.hpp 36 ''; 37 38 nativeBuildInputs = [ 39 cmake 40 pkg-config 41 - python3Packages.wrapPython 42 wrapGAppsHook 43 ]; 44 45 buildInputs = [ 46 - pcre 47 - tinyxml 48 libusb1 49 libzip 50 glib 51 gobject-introspection 52 gst_all_1.gstreamer 53 gst_all_1.gst-plugins-base 54 - libwebcam 55 - libunwind 56 - elfutils 57 - orc 58 - libuuid 59 - python3Packages.python 60 - python3Packages.pyqt5 61 ]; 62 63 - pythonPath = with python3Packages; [ pyqt5 pygobject3 ]; 64 - 65 - propagatedBuildInputs = pythonPath; 66 67 cmakeFlags = [ 68 - "-DBUILD_ARAVIS=OFF" # For GigE support. Won't need it as our camera is usb. 69 - "-DBUILD_GST_1_0=ON" 70 - "-DBUILD_TOOLS=ON" 71 - "-DBUILD_V4L2=ON" 72 - "-DBUILD_LIBUSB=ON" 73 - "-DBUILD_TESTS=ON" 74 - "-DTCAM_INSTALL_UDEV=${placeholder "out"}/lib/udev/rules.d" 75 - "-DTCAM_INSTALL_UVCDYNCTRL=${placeholder "out"}/share/uvcdynctrl/data/199e" 76 - "-DTCAM_INSTALL_GST_1_0=${placeholder "out"}/lib/gstreamer-1.0" 77 - "-DTCAM_INSTALL_GIR=${placeholder "out"}/share/gir-1.0" 78 - "-DTCAM_INSTALL_TYPELIB=${placeholder "out"}/lib/girepository-1.0" 79 - "-DTCAM_INSTALL_SYSTEMD=${placeholder "out"}/etc/systemd/system" 80 - "-DTCAM_INSTALL_PYTHON3_MODULES=${placeholder "out"}/lib/${python3Packages.python.libPrefix}/site-packages" 81 - "-DGSTREAMER_1.0_INCLUDEDIR=${placeholder "out"}/include/gstreamer-1.0" 82 # There are gobject introspection commands launched as part of the build. Those have a runtime 83 # dependency on `libtcam` (which itself is built as part of this build). In order to allow 84 # that, we set the dynamic linker's path to point on the build time location of the library. ··· 90 # gstreamer tests requires, besides gst-plugins-bad, plugins installed by this expression. 91 checkPhase = "ctest --force-new-ctest-process -E gstreamer"; 92 93 - postFixup = '' 94 - wrapPythonPrograms "$out $pythonPath" 95 ''; 96 97 meta = with lib; {
··· 3 , fetchFromGitHub 4 , cmake 5 , pkg-config 6 + , runtimeShell 7 + , catch2 8 + , elfutils 9 + , libselinux 10 + , libsepol 11 + , libunwind 12 , libusb1 13 + , libuuid 14 , libzip 15 + , orc 16 + , pcre 17 + , zstd 18 , glib 19 , gobject-introspection 20 , gst_all_1 21 , wrapGAppsHook 22 + , withDoc ? true 23 + , sphinx 24 + , graphviz 25 + , withAravis ? true 26 + , aravis 27 + , meson 28 + , withAravisUsbVision ? withAravis 29 + , withGui ? true 30 + , qt5 31 }: 32 33 stdenv.mkDerivation rec { 34 pname = "tiscamera"; 35 + version = "1.0.0"; 36 37 src = fetchFromGitHub { 38 owner = "TheImagingSource"; 39 repo = pname; 40 rev = "v-${pname}-${version}"; 41 + sha256 = "0msz33wvqrji11kszdswcvljqnjflmjpk0aqzmsv6i855y8xn6cd"; 42 }; 43 + 44 + patches = [ 45 + ./0001-tcamconvert-tcamsrc-add-missing-include-lib-dirs.patch 46 + ./0001-udev-rules-fix-install-location.patch 47 + ./0001-cmake-find-aravis-fix-pkg-cfg-include-dirs.patch 48 + ]; 49 50 postPatch = '' 51 cp ${catch2}/include/catch2/catch.hpp external/catch/catch.hpp 52 + 53 + substituteInPlace ./data/udev/80-theimagingsource-cameras.rules.in \ 54 + --replace "/bin/sh" "${runtimeShell}/bin/sh" \ 55 + --replace "typically /usr/bin/" "" \ 56 + --replace "typically /usr/share/theimagingsource/tiscamera/uvc-extension/" "" 57 ''; 58 59 nativeBuildInputs = [ 60 cmake 61 pkg-config 62 wrapGAppsHook 63 + ] ++ lib.optionals withDoc [ 64 + sphinx 65 + graphviz 66 + ] ++ lib.optionals withAravis [ 67 + meson 68 + ] ++ lib.optionals withGui [ 69 + qt5.wrapQtAppsHook 70 ]; 71 72 buildInputs = [ 73 + elfutils 74 + libselinux 75 + libsepol 76 + libunwind 77 libusb1 78 + libuuid 79 libzip 80 + orc 81 + pcre 82 + zstd 83 glib 84 gobject-introspection 85 gst_all_1.gstreamer 86 gst_all_1.gst-plugins-base 87 + gst_all_1.gst-plugins-good 88 + gst_all_1.gst-plugins-bad 89 + gst_all_1.gst-plugins-ugly 90 + ] ++ lib.optionals withAravis [ 91 + aravis 92 + ] ++ lib.optionals withGui [ 93 + qt5.qtbase 94 ]; 95 96 + hardeningDisable = [ "format" ]; 97 98 cmakeFlags = [ 99 + "-DTCAM_BUILD_GST_1_0=ON" 100 + "-DTCAM_BUILD_TOOLS=ON" 101 + "-DTCAM_BUILD_V4L2=ON" 102 + "-DTCAM_BUILD_LIBUSB=ON" 103 + "-DTCAM_BUILD_TESTS=ON" 104 + "-DTCAM_BUILD_ARAVIS=${if withAravis then "ON" else "OFF"}" 105 + "-DTCAM_BUILD_DOCUMENTATION=${if withDoc then "ON" else "OFF"}" 106 + "-DTCAM_BUILD_WITH_GUI=${if withGui then "ON" else "OFF"}" 107 + "-DTCAM_DOWNLOAD_MESON=OFF" 108 + "-DTCAM_INTERNAL_ARAVIS=OFF" 109 + "-DTCAM_ARAVIS_USB_VISION=${if withAravis && withAravisUsbVision then "ON" else "OFF"}" 110 + "-DTCAM_INSTALL_FORCE_PREFIX=ON" 111 # There are gobject introspection commands launched as part of the build. Those have a runtime 112 # dependency on `libtcam` (which itself is built as part of this build). In order to allow 113 # that, we set the dynamic linker's path to point on the build time location of the library. ··· 119 # gstreamer tests requires, besides gst-plugins-bad, plugins installed by this expression. 120 checkPhase = "ctest --force-new-ctest-process -E gstreamer"; 121 122 + # wrapGAppsHook: make sure we add ourselves to the introspection 123 + # and gstreamer paths. 124 + GI_TYPELIB_PATH = "${placeholder "out"}/lib/girepository-1.0"; 125 + GST_PLUGIN_SYSTEM_PATH_1_0 = "${placeholder "out"}/lib/gstreamer-1.0"; 126 + 127 + QT_PLUGIN_PATH = lib.optionalString withGui "${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}"; 128 + 129 + dontWrapQtApps = true; 130 + 131 + preFixup = '' 132 + gappsWrapperArgs+=("''${qtWrapperArgs[@]}") 133 ''; 134 135 meta = with lib; {
+1 -1
pkgs/top-level/all-packages.nix
··· 20962 20963 tinyxml-2 = callPackage ../development/libraries/tinyxml-2 { }; 20964 20965 - tiscamera = callPackage ../os-specific/linux/tiscamera { stdenv = gcc10StdenvCompat; }; 20966 20967 tivodecode = callPackage ../applications/video/tivodecode { }; 20968
··· 20962 20963 tinyxml-2 = callPackage ../development/libraries/tinyxml-2 { }; 20964 20965 + tiscamera = callPackage ../os-specific/linux/tiscamera { }; 20966 20967 tivodecode = callPackage ../applications/video/tivodecode { }; 20968