depot/pkgs/by-name/tl/tlclient/package.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

79 lines
2.1 KiB
Nix

{
lib,
stdenv,
fetchurl,
autoPatchelfHook,
alsa-lib,
libX11,
pcsclite,
testers,
}:
stdenv.mkDerivation (
finalAttrs:
let
version = "4.17.0";
buildNum = "3543";
in
{
pname = "tlclient";
version = "${version}-${buildNum}";
src = fetchurl {
url = "https://www.cendio.com/downloads/clients/tl-${finalAttrs.version}-client-linux-dynamic-x86_64.tar.gz";
hash = "sha256-7pl97xGNFwSDpWMpBvkz/bfMsWquVsJVGB+feWJvRQY=";
};
nativeBuildInputs = [
autoPatchelfHook
];
buildInputs = [
alsa-lib
libX11
pcsclite
];
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p "$out"
cp -R lib "$out/"
cp -R lib/tlclient/share "$out/"
install -Dm644 "lib/tlclient/EULA.txt" "$out/share/licenses/tlclient/EULA.txt"
install -m644 "lib/tlclient/open_source_licenses.txt" "$out/share/licenses/tlclient/open_source_licenses.txt"
substituteInPlace "$out/share/applications/thinlinc-client.desktop" \
--replace-fail "/opt/thinlinc/bin/" ""
install -Dm644 "etc/tlclient.conf" "$out/etc/tlclient.conf"
install -Dm755 bin/tlclient* -t "$out/bin"
install -Dm644 "lib/tlclient/thinlinc_128.png" "$out/share/icons/hicolor/128x128/apps/thinlinc-client.png"
runHook postInstall
'';
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
version = "${version} build ${buildNum}";
};
meta = {
description = "Linux remote desktop client built on open source technology";
license = {
fullName = "Cendio End User License Agreement 3.2";
url = "https://www.cendio.com/thinlinc/docs/legal/eula";
free = false;
};
homepage = "https://www.cendio.com/";
changelog = "https://www.cendio.com/thinlinc/docs/relnotes/${version}/";
maintainers = with lib.maintainers; [ felixalbrigtsen ];
platforms = with lib.platforms; linux ++ darwin ++ windows;
broken = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64);
mainProgram = "tlclient";
};
}
)