2024-04-21 15:54:59 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, makeWrapper
|
|
|
|
, dpkg
|
|
|
|
, fetchurl
|
|
|
|
, autoPatchelfHook
|
|
|
|
, curl
|
|
|
|
, libkrb5
|
|
|
|
, lttng-ust
|
|
|
|
, libpulseaudio
|
|
|
|
, gtk3
|
|
|
|
, openssl_1_1
|
|
|
|
, icu70
|
|
|
|
, webkitgtk
|
|
|
|
, librsvg
|
|
|
|
, gdk-pixbuf
|
|
|
|
, libsoup
|
|
|
|
, glib-networking
|
|
|
|
, graphicsmagick_q16
|
|
|
|
, libva
|
|
|
|
, libusb1
|
|
|
|
, hiredis
|
|
|
|
, xcbutil
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-03-09 03:18:52 +00:00
|
|
|
pname = "aws-workspaces";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "4.7.0.4312";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2024-04-21 15:54:59 +00:00
|
|
|
# Check new version at https://d3nt0h4h6pmmc4.cloudfront.net/ubuntu/dists/focal/main/binary-amd64/Packages
|
2021-03-09 03:18:52 +00:00
|
|
|
urls = [
|
2024-04-21 15:54:59 +00:00
|
|
|
"https://d3nt0h4h6pmmc4.cloudfront.net/ubuntu/dists/focal/main/binary-amd64/workspacesclient_${finalAttrs.version}_amd64.deb"
|
|
|
|
"https://archive.org/download/workspacesclient_${finalAttrs.version}_amd64/workspacesclient_${finalAttrs.version}_amd64.deb"
|
2021-03-09 03:18:52 +00:00
|
|
|
];
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-G0o5uFnEkiUWmkTMUHlVcidw+2x8e/KmMfVBE7oLXV8=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
# Crashes at startup when stripping:
|
|
|
|
# "Failed to create CoreCLR, HRESULT: 0x80004005"
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
stdenv.cc.cc.lib
|
2021-04-05 15:23:46 +00:00
|
|
|
libkrb5
|
2021-03-09 03:18:52 +00:00
|
|
|
curl
|
|
|
|
lttng-ust
|
|
|
|
libpulseaudio
|
|
|
|
gtk3
|
|
|
|
openssl_1_1.out
|
2022-07-18 16:21:45 +00:00
|
|
|
icu70
|
2021-03-09 03:18:52 +00:00
|
|
|
webkitgtk
|
|
|
|
librsvg
|
|
|
|
gdk-pixbuf
|
|
|
|
libsoup
|
|
|
|
glib-networking
|
2022-07-18 16:21:45 +00:00
|
|
|
graphicsmagick_q16
|
2023-03-24 00:07:29 +00:00
|
|
|
hiredis
|
2023-03-27 19:17:25 +00:00
|
|
|
libusb1
|
2023-03-24 00:07:29 +00:00
|
|
|
libva
|
2024-01-02 11:29:13 +00:00
|
|
|
xcbutil
|
2021-03-09 03:18:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
${dpkg}/bin/dpkg -x $src $out
|
|
|
|
'';
|
|
|
|
|
2021-09-22 15:38:15 +00:00
|
|
|
preFixup = ''
|
|
|
|
patchelf --replace-needed liblttng-ust.so.0 liblttng-ust.so $out/lib/libcoreclrtraceptprovider.so
|
2022-07-18 16:21:45 +00:00
|
|
|
patchelf --replace-needed libGraphicsMagick++-Q16.so.12 libGraphicsMagick++.so.12 $out/usr/lib/x86_64-linux-gnu/pcoip-client/vchan_plugins/libvchan-plugin-clipboard.so
|
2023-03-24 00:07:29 +00:00
|
|
|
patchelf --replace-needed libhiredis.so.0.14 libhiredis.so $out/lib/libpcoip_core.so
|
2021-09-22 15:38:15 +00:00
|
|
|
'';
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
installPhase = ''
|
2024-04-21 15:54:59 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2021-09-22 15:38:15 +00:00
|
|
|
mkdir -p $out/bin $out/lib
|
|
|
|
mv $out/opt/workspacesclient/* $out/lib
|
|
|
|
rm -rf $out/opt
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2021-09-22 15:38:15 +00:00
|
|
|
wrapProgram $out/lib/workspacesclient \
|
2024-04-21 15:54:59 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath finalAttrs.buildInputs}" \
|
2021-03-09 03:18:52 +00:00
|
|
|
--set GDK_PIXBUF_MODULE_FILE "${librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" \
|
|
|
|
--set GIO_EXTRA_MODULES "${glib-networking.out}/lib/gio/modules"
|
2021-09-22 15:38:15 +00:00
|
|
|
|
|
|
|
mv $out/lib/workspacesclient $out/bin
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2021-03-09 03:18:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Client for Amazon WorkSpaces, a managed, secure Desktop-as-a-Service (DaaS) solution";
|
|
|
|
homepage = "https://clients.amazonworkspaces.com";
|
|
|
|
license = licenses.unfree;
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "workspacesclient";
|
2023-03-24 00:07:29 +00:00
|
|
|
maintainers = with maintainers; [ mausch dylanmtaylor ];
|
2024-04-21 15:54:59 +00:00
|
|
|
platforms = [ "x86_64-linux" ]; # TODO Mac support
|
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
2024-04-21 15:54:59 +00:00
|
|
|
})
|