about summary refs log tree commit diff
path: root/pkgs/applications/video
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r--pkgs/applications/video/clickshare-csc1/default.nix124
-rw-r--r--pkgs/applications/video/vokoscreen/default.nix25
-rw-r--r--pkgs/applications/video/vokoscreen/ffmpeg-out-of-box.patch17
3 files changed, 144 insertions, 22 deletions
diff --git a/pkgs/applications/video/clickshare-csc1/default.nix b/pkgs/applications/video/clickshare-csc1/default.nix
new file mode 100644
index 000000000000..34c80e1050b4
--- /dev/null
+++ b/pkgs/applications/video/clickshare-csc1/default.nix
@@ -0,0 +1,124 @@
+{ lib
+, stdenv
+, fetchurl
+, alsaLib
+, autoPatchelfHook
+, binutils-unwrapped
+, gnutar
+, libav_0_8
+, libnotify
+, libresample
+, libusb1
+, qt4
+, rpmextract
+, unzip
+, xorg
+, usersGroup ? "clickshare"  # for udev access rules
+}:
+
+
+# This fetches the latest firmware version that
+# contains a linux-compatible client binary.
+# Barco no longer supports linux, so updates are unlikely:
+# https://www.barco.com/de/support/clickshare-csc-1/knowledge-base/KB1191
+
+
+stdenv.mkDerivation rec {
+  name = "clickshare-csc1-${version}";
+  version = "01.07.00.033";
+  src = fetchurl {
+    name = "clickshare-csc1-${version}.zip";
+    url = https://www.barco.com/services/website/de/TdeFiles/Download?FileNumber=R33050020&TdeType=3&MajorVersion=01&MinorVersion=07&PatchVersion=00&BuildVersion=033;
+    sha256 = "0h4jqidqvk4xkaky5bizi7ilz4qzl2mh68401j21y3djnzx09br3";
+  };
+
+  nativeBuildInputs = [
+    autoPatchelfHook
+    binutils-unwrapped
+    gnutar
+    rpmextract
+    unzip
+  ];
+  buildInputs = [
+    alsaLib
+    libav_0_8
+    libnotify
+    libresample
+    libusb1
+    qt4
+    xorg.libX11
+    xorg.libXdamage
+    xorg.libXfixes
+    xorg.libXinerama
+    xorg.libXtst
+  ];
+  sourceRoot = ".";
+
+  # The source consists of nested archives.
+  # We extract them archive by archive.
+  # If the filename contains version numbers,
+  # we use a wildcard and check that there
+  # is actually only one file matching.
+  postUnpack =
+    let
+      rpmArch =
+        if stdenv.hostPlatform.isx86_32 then "i386" else
+        if stdenv.hostPlatform.isx86_64 then "x86_64" else
+        throw "unsupported system: ${stdenv.hostPlatform.system}";
+    in
+      ''
+        ls clickshare_baseunit_*.*_all.signed_release.ipk | wc --lines | xargs test 1 =
+        tar --verbose --extract --one-top-level=dir1 < clickshare_baseunit_*.*_all.signed_release.ipk
+        mkdir dir2
+        ( cd dir2 ; ar xv ../dir1/firmware.ipk )
+        tar --verbose --gzip --extract --one-top-level=dir3 --exclude='dev/*' < dir2/data.tar.gz
+        ls dir3/clickshare/clickshare-*-*.${rpmArch}.rpm | wc --lines | xargs test 1 =
+        mkdir dir4
+        cd dir4
+        rpmextract ../dir3/clickshare/clickshare-*-*.${rpmArch}.rpm
+      '';
+
+  installPhase = ''
+    runHook preInstall
+    mkdir --verbose --parents $out
+    mv --verbose --target-directory=. usr/*
+    rmdir --verbose usr
+    cp --verbose --recursive --target-directory=$out *
+    runHook postInstall
+  '';
+
+  # Default udev rule restricts access to the
+  # clickshare USB dongle to the `wheel` group.
+  # We replace it with the group
+  # stated in the package arguments.
+  # Also, we patch executable and icon paths in .desktop files.
+  preFixup = ''
+    substituteInPlace \
+        $out/lib/udev/rules.d/99-clickshare.rules \
+        --replace wheel ${usersGroup}
+    substituteInPlace \
+        $out/share/applications/clickshare.desktop \
+        --replace Exec= Exec=$out/bin/ \
+        --replace =/usr =$out
+    substituteInPlace \
+        $out/etc/xdg/autostart/clickshare-launcher.desktop \
+        --replace =/usr =$out
+  '';
+
+  meta = {
+    homepage = https://www.barco.com/de/support/clickshare-csc-1/drivers;
+    downloadPage = https://www.barco.com/de/Support/software/R33050020;
+    platforms = [ "i686-linux" "x86_64-linux" ];
+    license = lib.licenses.unfree;
+    maintainers = [ lib.maintainers.yarny ];
+    description = "Linux driver/client for Barco ClickShare CSC-1";
+    longDescription = ''
+      Barco ClickShare is a wireless presentation system
+      where a USB dongle transmits to a base station
+      that is connected with a beamer.
+      The USB dongle requires proprietary software that
+      captures the screen and sends it to the dongle.
+      This package provides the necessary software for Linux.
+    '';
+  };
+}
diff --git a/pkgs/applications/video/vokoscreen/default.nix b/pkgs/applications/video/vokoscreen/default.nix
index 67905033ba10..e609c1cd3395 100644
--- a/pkgs/applications/video/vokoscreen/default.nix
+++ b/pkgs/applications/video/vokoscreen/default.nix
@@ -1,14 +1,18 @@
-{ stdenv, fetchgit
-, pkgconfig, qtbase, qttools, qmake, qtx11extras, alsaLib, libv4l, libXrandr
+{ stdenv, fetchFromGitHub
+, pkgconfig, qtbase, qttools, qmake, qtmultimedia, qtx11extras, alsaLib, libv4l, libXrandr
 , ffmpeg
 }:
 
-stdenv.mkDerivation {
-  name = "vokoscreen-2.5.0";
-  src = fetchgit {
-    url = "https://github.com/vkohaupt/vokoscreen.git";
-    rev = "8325c8658d6e777d34d2e6b8c8bc03f8da9b3d2f";
-    sha256 = "1hvw7xz1mj16ishbaip73wddbmgibsz0pad4y586zbarpynss25z";
+stdenv.mkDerivation rec {
+
+  pname = "vokoscreen";
+  version = "2.5.8-beta";
+
+  src = fetchFromGitHub {
+    owner   = "vkohaupt";
+    repo    = "vokoscreen";
+    rev     = version;
+    sha256  = "1a85vbsi53mhzva49smqwcs61c51wv3ic410nvb9is9nlsbifwan";
   };
 
   nativeBuildInputs = [ pkgconfig qmake ];
@@ -16,6 +20,7 @@ stdenv.mkDerivation {
     alsaLib
     libv4l
     qtbase
+    qtmultimedia
     qttools
     qtx11extras
     libXrandr
@@ -35,14 +40,14 @@ stdenv.mkDerivation {
 
   meta = with stdenv.lib; {
     description = "Simple GUI screencast recorder, using ffmpeg";
-    homepage = http://linuxecke.volkoh.de/vokoscreen/vokoscreen.html;
+    homepage = "http://linuxecke.volkoh.de/vokoscreen/vokoscreen.html";
     longDescription = ''
       vokoscreen is an easy to use screencast creator to record
       educational videos, live recordings of browser, installation,
       videoconferences, etc.
     '';
     license = licenses.gpl2Plus;
-    maintainers = [maintainers.league];
+    maintainers = [ maintainers.league ];
     platforms = platforms.linux;
   };
 }
diff --git a/pkgs/applications/video/vokoscreen/ffmpeg-out-of-box.patch b/pkgs/applications/video/vokoscreen/ffmpeg-out-of-box.patch
index 8f696f263013..afcee3f9715f 100644
--- a/pkgs/applications/video/vokoscreen/ffmpeg-out-of-box.patch
+++ b/pkgs/applications/video/vokoscreen/ffmpeg-out-of-box.patch
@@ -1,20 +1,20 @@
 diff --git a/settings/QvkSettings.cpp b/settings/QvkSettings.cpp
-index bbf2abf..187efad 100644
+index 3008e62..07485bd 100644
 --- a/settings/QvkSettings.cpp
 +++ b/settings/QvkSettings.cpp
-@@ -56,17 +56,8 @@ void QvkSettings::readAll()
-       GIFPlayer = settings.value( "GIFplayer" ).toString();
+@@ -66,17 +66,8 @@ void QvkSettings::readAll()
        Minimized = settings.value( "Minimized", 0 ).toUInt();
+       MinimizedByStart = settings.value( "MinimizedByStart", 0 ).toUInt();
        Countdown = settings.value( "Countdown", 0 ).toUInt();
 -      QFile file;
 -      if ( file.exists( qApp->applicationDirPath().append( "/bin/ffmpeg" ) ) == true )
 -      {
--	vokoscreenWithLibs = true;
+-        vokoscreenWithLibs = true;
 -        Recorder = qApp->applicationDirPath().append( "/bin/ffmpeg" );
 -      }
 -      else
 -      {
--	vokoscreenWithLibs = false;
+-        vokoscreenWithLibs = false;
 -        Recorder = settings.value( "Recorder", "ffmpeg" ).toString();
 -      }
 +      vokoscreenWithLibs = true;
@@ -22,10 +22,3 @@ index bbf2abf..187efad 100644
      settings.endGroup();
      
      settings.beginGroup( "Videooptions" );
-@@ -398,4 +389,4 @@ double QvkSettings::getShowClickTime()
- int QvkSettings::getShowKeyOnOff()
- {
-   return showKeyOnOff; 
--}
-\ No newline at end of file
-+}