summary refs log tree commit diff
path: root/pkgs/os-specific/linux/tiscamera
diff options
context:
space:
mode:
authorJ. Neto <jnetod@tuta.io>2021-05-10 15:26:47 -0300
committerJ. Neto <jnetod@tuta.io>2021-05-12 01:35:29 -0300
commitf75b9fe4f3122a178bdc15eac94dc4c33b7343fb (patch)
tree0ec0c2cb2ecc6779a58db92a3b60814a34a9d8b7 /pkgs/os-specific/linux/tiscamera
parent9622485d70a52f32a10972d0b913bfc99e6fe440 (diff)
downloadnixpkgs-f75b9fe4f3122a178bdc15eac94dc4c33b7343fb.tar
nixpkgs-f75b9fe4f3122a178bdc15eac94dc4c33b7343fb.tar.gz
nixpkgs-f75b9fe4f3122a178bdc15eac94dc4c33b7343fb.tar.bz2
nixpkgs-f75b9fe4f3122a178bdc15eac94dc4c33b7343fb.tar.lz
nixpkgs-f75b9fe4f3122a178bdc15eac94dc4c33b7343fb.tar.xz
nixpkgs-f75b9fe4f3122a178bdc15eac94dc4c33b7343fb.tar.zst
nixpkgs-f75b9fe4f3122a178bdc15eac94dc4c33b7343fb.zip
tiscamera: 0.11.1 -> 0.13.1
Diffstat (limited to 'pkgs/os-specific/linux/tiscamera')
-rw-r--r--pkgs/os-specific/linux/tiscamera/default.nix31
1 files changed, 22 insertions, 9 deletions
diff --git a/pkgs/os-specific/linux/tiscamera/default.nix b/pkgs/os-specific/linux/tiscamera/default.nix
index f9196fc1686..38bc7c3eaff 100644
--- a/pkgs/os-specific/linux/tiscamera/default.nix
+++ b/pkgs/os-specific/linux/tiscamera/default.nix
@@ -14,24 +14,27 @@
 , libunwind
 , elfutils
 , orc
-, python3
+, python3Packages
 , libuuid
+, wrapGAppsHook
 }:
 
 stdenv.mkDerivation rec {
   pname = "tiscamera";
-  version = "0.11.1";
+  version = "0.13.1";
 
   src = fetchFromGitHub {
     owner = "TheImagingSource";
     repo = pname;
     rev = "v-${pname}-${version}";
-    sha256 = "07vp6khgl6qd3a4519dmx1s5bfw7pld793p50pjn29fqh91fm93g";
+    sha256 = "0hpy9yhc4mn6w8gvzwif703smmcys0j2jqbz2xfghqxcyb0ykplj";
   };
 
   nativeBuildInputs = [
     cmake
     pkg-config
+    python3Packages.wrapPython
+    wrapGAppsHook
   ];
 
   buildInputs = [
@@ -47,33 +50,43 @@ stdenv.mkDerivation rec {
     libunwind
     elfutils
     orc
-    python3
     libuuid
+    python3Packages.python
+    python3Packages.pyqt5
   ];
 
+  pythonPath = with python3Packages; [ pyqt5 pygobject3 ];
+
+  propagatedBuildInputs = pythonPath;
+
   cmakeFlags = [
     "-DBUILD_ARAVIS=OFF" # For GigE support. Won't need it as our camera is usb.
     "-DBUILD_GST_1_0=ON"
     "-DBUILD_TOOLS=ON"
     "-DBUILD_V4L2=ON"
     "-DBUILD_LIBUSB=ON"
+    "-DBUILD_TESTS=ON"
     "-DTCAM_INSTALL_UDEV=${placeholder "out"}/lib/udev/rules.d"
     "-DTCAM_INSTALL_UVCDYNCTRL=${placeholder "out"}/share/uvcdynctrl/data/199e"
     "-DTCAM_INSTALL_GST_1_0=${placeholder "out"}/lib/gstreamer-1.0"
     "-DTCAM_INSTALL_GIR=${placeholder "out"}/share/gir-1.0"
     "-DTCAM_INSTALL_TYPELIB=${placeholder "out"}/lib/girepository-1.0"
     "-DTCAM_INSTALL_SYSTEMD=${placeholder "out"}/etc/systemd/system"
+    "-DTCAM_INSTALL_PYTHON3_MODULES=${placeholder "out"}/lib/${python3Packages.python.libPrefix}/site-packages"
+    "-DGSTREAMER_1.0_INCLUDEDIR=${placeholder "out"}/include/gstreamer-1.0"
     # There are gobject introspection commands launched as part of the build. Those have a runtime
     # dependency on `libtcam` (which itself is built as part of this build). In order to allow
     # that, we set the dynamic linker's path to point on the build time location of the library.
     "-DCMAKE_SKIP_BUILD_RPATH=OFF"
   ];
 
-  postPatch = ''
-    substituteInPlace ./src/BackendLoader.cpp \
-      --replace '"libtcam-v4l2.so"' "\"$out/lib/tcam-0/libtcam-v4l2.so\"" \
-      --replace '"libtcam-aravis.so"' "\"$out/lib/tcam-0/libtcam-aravis.so\"" \
-      --replace '"libtcam-libusb.so"' "\"$out/lib/tcam-0/libtcam-libusb.so\""
+  doCheck = true;
+
+  # gstreamer tests requires, besides gst-plugins-bad, plugins installed by this expression.
+  checkPhase = "ctest --force-new-ctest-process -E gstreamer";
+
+  postFixup = ''
+    wrapPythonPrograms "$out $pythonPath"
   '';
 
   meta = with lib; {