nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 autoPatchelfHook,
6 alsa-lib,
7 libX11,
8 pcsclite,
9 testers,
10}:
11
12let
13 version = "4.19.0";
14 buildNum = "4005";
15in
16stdenv.mkDerivation (finalAttrs: {
17 pname = "tlclient";
18 version = "${version}-${buildNum}";
19
20 src = fetchurl {
21 url = "https://www.cendio.com/downloads/clients/tl-${finalAttrs.version}-client-linux-dynamic-x86_64.tar.gz";
22 hash = "sha256-shlhu0m+TPgw3ndR70QdJ6Z0AyJdI/xmHJv+ZbFVokE=";
23 };
24
25 nativeBuildInputs = [
26 autoPatchelfHook
27 ];
28
29 buildInputs = [
30 alsa-lib
31 libX11
32 pcsclite
33 ];
34
35 dontConfigure = true;
36 dontBuild = true;
37
38 installPhase = ''
39 runHook preInstall
40
41 rm etc/ssh_known_hosts
42 rm --recursive lib/tlclient/lib
43 substituteInPlace lib/tlclient/share/applications/thinlinc-client.desktop \
44 --replace-fail "/opt/thinlinc/bin/" ""
45 cp --recursive . $out
46 cp --recursive $out/lib/tlclient/share $out/share
47 install -D --mode=0644 $out/lib/tlclient/EULA.txt $out/share/licenses/tlclient/EULA.txt
48 install -D --mode=0644 $out/lib/tlclient/open_source_licenses.txt $out/share/licenses/tlclient/open_source_licenses.txt
49
50 runHook postInstall
51 '';
52
53 passthru.tests.version = testers.testVersion {
54 package = finalAttrs.finalPackage;
55 version = "${version} build ${buildNum}";
56 };
57
58 meta = {
59 description = "Linux remote desktop client built on open source technology";
60 license = {
61 fullName = "Cendio end-user license agreement";
62 url = "https://www.cendio.com/thinlinc/docs/legal/eula";
63 free = false;
64 };
65 homepage = "https://www.cendio.com/";
66 changelog = "https://www.cendio.com/thinlinc/docs/relnotes/${version}/";
67 maintainers = with lib.maintainers; [
68 felixalbrigtsen
69 kyehn
70 ];
71 platforms = with lib.platforms; linux ++ darwin ++ windows;
72 broken = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64);
73 mainProgram = "tlclient";
74 };
75})