···
16
+
, usersGroup ? "clickshare" # for udev access rules
20
+
# This fetches the latest firmware version that
21
+
# contains a linux-compatible client binary.
22
+
# Barco no longer supports linux, so updates are unlikely:
23
+
# https://www.barco.com/de/support/clickshare-csc-1/knowledge-base/KB1191
26
+
stdenv.mkDerivation rec {
27
+
name = "clickshare-csc1-${version}";
28
+
version = "01.07.00.033";
30
+
name = "clickshare-csc1-${version}.zip";
31
+
url = https://www.barco.com/services/website/de/TdeFiles/Download?FileNumber=R33050020&TdeType=3&MajorVersion=01&MinorVersion=07&PatchVersion=00&BuildVersion=033;
32
+
sha256 = "0h4jqidqvk4xkaky5bizi7ilz4qzl2mh68401j21y3djnzx09br3";
35
+
nativeBuildInputs = [
57
+
# The source consists of nested archives.
58
+
# We extract them archive by archive.
59
+
# If the filename contains version numbers,
60
+
# we use a wildcard and check that there
61
+
# is actually only one file matching.
65
+
if stdenv.hostPlatform.isx86_32 then "i386" else
66
+
if stdenv.hostPlatform.isx86_64 then "x86_64" else
67
+
throw "unsupported system: ${stdenv.hostPlatform.system}";
70
+
ls clickshare_baseunit_*.*_all.signed_release.ipk | wc --lines | xargs test 1 =
71
+
tar --verbose --extract --one-top-level=dir1 < clickshare_baseunit_*.*_all.signed_release.ipk
73
+
( cd dir2 ; ar xv ../dir1/firmware.ipk )
74
+
tar --verbose --gzip --extract --one-top-level=dir3 --exclude='dev/*' < dir2/data.tar.gz
75
+
ls dir3/clickshare/clickshare-*-*.${rpmArch}.rpm | wc --lines | xargs test 1 =
78
+
rpmextract ../dir3/clickshare/clickshare-*-*.${rpmArch}.rpm
83
+
mkdir --verbose --parents $out
84
+
mv --verbose --target-directory=. usr/*
86
+
cp --verbose --recursive --target-directory=$out *
90
+
# Default udev rule restricts access to the
91
+
# clickshare USB dongle to the `wheel` group.
92
+
# We replace it with the group
93
+
# stated in the package arguments.
94
+
# Also, we patch executable and icon paths in .desktop files.
97
+
$out/lib/udev/rules.d/99-clickshare.rules \
98
+
--replace wheel ${usersGroup}
100
+
$out/share/applications/clickshare.desktop \
101
+
--replace Exec= Exec=$out/bin/ \
102
+
--replace =/usr =$out
103
+
substituteInPlace \
104
+
$out/etc/xdg/autostart/clickshare-launcher.desktop \
105
+
--replace =/usr =$out
109
+
homepage = https://www.barco.com/de/support/clickshare-csc-1/drivers;
110
+
downloadPage = https://www.barco.com/de/Support/software/R33050020;
111
+
platforms = [ "i686-linux" "x86_64-linux" ];
112
+
license = lib.licenses.unfree;
113
+
maintainers = [ lib.maintainers.yarny ];
114
+
description = "Linux driver/client for Barco ClickShare CSC-1";
115
+
longDescription = ''
116
+
Barco ClickShare is a wireless presentation system
117
+
where a USB dongle transmits to a base station
118
+
that is connected with a beamer.
119
+
The USB dongle requires proprietary software that
120
+
captures the screen and sends it to the dongle.
121
+
This package provides the necessary software for Linux.