Files
nixpkgs/pkgs/by-name/aw/aws-workspaces/workspacesclient.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

71 lines
2.0 KiB
Nix

{
stdenv,
lib,
fetchurl,
dpkg,
makeBinaryWrapper,
glib-networking,
}:
let
dcv-path = "lib/x86_64-linux-gnu/workspacesclient/dcv";
in
stdenv.mkDerivation (finalAttrs: {
pname = "workspacesclient";
version = "2025.0.5296";
src = fetchurl {
urls = [
"https://d3nt0h4h6pmmc4.cloudfront.net/ubuntu/dists/jammy/main/binary-amd64/workspacesclient_${finalAttrs.version}_amd64.deb"
];
hash = "sha256-VPNZN9AsrGJ56O8B5jxlgLMvrUViTv6yto8c5pGQc0A=";
};
nativeBuildInputs = [
dpkg
makeBinaryWrapper
];
installPhase = ''
runHook preInstall
mkdir -p $out
cp -R usr/* $out/
# We introduce a dependency on the source file so that it need not be redownloaded everytime
echo $src >> "$out/share/workspace_dependencies.pin"
runHook postInstall
'';
postFixup = ''
# provide network support
wrapProgram "$out/bin/workspacesclient" \
--set GIO_EXTRA_MODULES ${glib-networking}/lib/gio/modules \
# dcvclient does not setup the environment correctly.
# Instead wrap the binary directly the correct environment paths
mv $out/${dcv-path}/dcvclientbin $out/${dcv-path}/dcvclient
wrapProgram $out/${dcv-path}/dcvclient \
--suffix LD_LIBRARY_PATH : $out/${dcv-path} \
--suffix GIO_EXTRA_MODULES : ${dcv-path}/gio/modules \
--set DCV_SASL_PLUGIN_DIR $out/${dcv-path}/sasl2 \
# shrink the install by removing all vendored libraries which will be provided by Nixpkgs
find $out/${dcv-path} -name lib\* ! -name libdcv\* ! -name libgioopenssl\* | xargs rm
'';
meta = {
description = "Client for Amazon WorkSpaces, a managed, secure Desktop-as-a-Service (DaaS) solution";
homepage = "https://clients.amazonworkspaces.com";
license = lib.licenses.unfree;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
mainProgram = "workspacesclient";
maintainers = with lib.maintainers; [
mausch
dylanmtaylor
];
platforms = [ "x86_64-linux" ]; # TODO Mac support
};
})