Merge pull request #90692 from Ma27/citrix-workspace
citrix_workspace: add more features, refactor derivation
This commit is contained in:
commit
98d2458e66
@ -4,34 +4,36 @@
|
|||||||
<title>Citrix Workspace</title>
|
<title>Citrix Workspace</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<note>
|
The <link xlink:href="https://www.citrix.com/products/workspace-app/">Citrix Workspace App</link> is a remote desktop viewer which provides access to <link xlink:href="https://www.citrix.com/products/xenapp-xendesktop/">XenDesktop</link> installations.
|
||||||
<para>
|
|
||||||
Please note that the <literal>citrix_receiver</literal> package has been deprecated since its development was <link xlink:href="https://docs.citrix.com/en-us/citrix-workspace-app.html">discontinued by upstream</link> and has been replaced by <link xlink:href="https://www.citrix.com/products/workspace-app/">the citrix workspace app</link>.
|
|
||||||
</para>
|
|
||||||
</note>
|
|
||||||
<link xlink:href="https://www.citrix.com/products/receiver/">Citrix Receiver</link> and <link xlink:href="https://www.citrix.com/products/workspace-app/">Citrix Workspace App</link> are a remote desktop viewers which provide access to <link xlink:href="https://www.citrix.com/products/xenapp-xendesktop/">XenDesktop</link> installations.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section xml:id="sec-citrix-base">
|
<section xml:id="sec-citrix-base">
|
||||||
<title>Basic usage</title>
|
<title>Basic usage</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The tarball archive needs to be downloaded manually as the license agreements of the vendor for <link xlink:href="https://www.citrix.com/downloads/citrix-receiver/">Citrix Receiver</link> or <link xlink:href="https://www.citrix.de/downloads/workspace-app/linux/workspace-app-for-linux-latest.html">Citrix Workspace</link> need to be accepted first. Then run <command>nix-prefetch-url file://$PWD/linuxx64-$version.tar.gz</command>. With the archive available in the store the package can be built and installed with Nix.
|
The tarball archive needs to be downloaded manually as the license agreements of the vendor for <link xlink:href="https://www.citrix.de/downloads/workspace-app/linux/workspace-app-for-linux-latest.html">Citrix Workspace</link> needs to be accepted first. Then run <command>nix-prefetch-url file://$PWD/linuxx64-$version.tar.gz</command>. With the archive available in the store the package can be built and installed with Nix.
|
||||||
</para>
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
<warning>
|
<section xml:id="sec-citrix-selfservice">
|
||||||
<title>Caution with <command>nix-shell</command> installs</title>
|
<title>Citrix Selfservice</title>
|
||||||
<para>
|
<para>
|
||||||
It's recommended to install <literal>Citrix Receiver</literal> and/or <literal>Citrix Workspace</literal> using <literal>nix-env -i</literal> or globally to ensure that the <literal>.desktop</literal> files are installed properly into <literal>$XDG_CONFIG_DIRS</literal>. Otherwise it won't be possible to open <literal>.ica</literal> files automatically from the browser to start a Citrix connection.
|
The <link xlink:href="https://support.citrix.com/article/CTX200337">selfservice</link> is an application managing Citrix desktops and applications. Please note that this feature only works with at least <package>citrix_workspace_20_06_0</package> and later versions.
|
||||||
</para>
|
</para>
|
||||||
</warning>
|
<para>
|
||||||
|
In order to set this up, you first have to <link xlink:href="https://its.uiowa.edu/support/article/102186">download the <literal>.cr</literal> file from the Netscaler Gateway</link>. After that you can configure the <command>selfservice</command> like this:
|
||||||
|
<screen>
|
||||||
|
<prompt>$ </prompt>storebrowse -C ~/Downloads/receiverconfig.cr
|
||||||
|
<prompt>$ </prompt>selfservice
|
||||||
|
</screen>
|
||||||
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section xml:id="sec-citrix-custom-certs">
|
<section xml:id="sec-citrix-custom-certs">
|
||||||
<title>Custom certificates</title>
|
<title>Custom certificates</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The <literal>Citrix Workspace App</literal> in <literal>nixpkgs</literal> trust several certificates <link xlink:href="https://curl.haxx.se/docs/caextract.html">from the Mozilla database</link> by default. However several companies using Citrix might require their own corporate certificate. On distros with imperative packaging these certs can be stored easily in <link xlink:href="https://developer-docs.citrix.com/projects/receiver-for-linux-command-reference/en/13.7/"><literal>$ICAROOT</literal></link>, however this directory is a store path in <literal>nixpkgs</literal>. In order to work around this issue the package provides a simple mechanism to add custom certificates without rebuilding the entire package using <literal>symlinkJoin</literal>:
|
The <literal>Citrix Workspace App</literal> in <literal>nixpkgs</literal> trusts several certificates <link xlink:href="https://curl.haxx.se/docs/caextract.html">from the Mozilla database</link> by default. However several companies using Citrix might require their own corporate certificate. On distros with imperative packaging these certs can be stored easily in <link xlink:href="https://developer-docs.citrix.com/projects/receiver-for-linux-command-reference/en/13.7/"><literal>$ICAROOT</literal></link>, however this directory is a store path in <literal>nixpkgs</literal>. In order to work around this issue the package provides a simple mechanism to add custom certificates without rebuilding the entire package using <literal>symlinkJoin</literal>:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[with import <nixpkgs> { config.allowUnfree = true; };
|
<![CDATA[with import <nixpkgs> { config.allowUnfree = true; };
|
||||||
let extraCerts = [ ./custom-cert-1.pem ./custom-cert-2.pem /* ... */ ]; in
|
let extraCerts = [ ./custom-cert-1.pem ./custom-cert-2.pem /* ... */ ]; in
|
||||||
|
@ -1,232 +1,25 @@
|
|||||||
{ stdenv
|
{ lib, callPackage }:
|
||||||
, lib
|
|
||||||
, fetchurl
|
# For detailed information about the Citrix source-tarball, please refer to the OEM
|
||||||
, requireFile
|
# reference guide: https://developer-docs.citrix.com/projects/workspace-app-for-linux-oem-guide/en/latest/
|
||||||
, makeWrapper
|
|
||||||
, libredirect
|
|
||||||
, busybox
|
|
||||||
, file
|
|
||||||
, makeDesktopItem
|
|
||||||
, tzdata
|
|
||||||
, cacert
|
|
||||||
, dconf
|
|
||||||
, glib
|
|
||||||
, gtk2
|
|
||||||
, atk
|
|
||||||
, gdk-pixbuf
|
|
||||||
, cairo
|
|
||||||
, pango
|
|
||||||
, gnome3
|
|
||||||
, xorg
|
|
||||||
, libpng12
|
|
||||||
, freetype
|
|
||||||
, fontconfig
|
|
||||||
, gtk_engines
|
|
||||||
, alsaLib
|
|
||||||
, zlib
|
|
||||||
, version ? "20.06.0"
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
let
|
||||||
versionInfo = let
|
inherit (callPackage ./sources.nix { }) supportedVersions unsupportedVersions;
|
||||||
supportedVersions = {
|
mkCitrix = callPackage ./generic.nix { };
|
||||||
"19.12.0" = {
|
|
||||||
major = "19";
|
|
||||||
minor = "12";
|
|
||||||
patch = "0";
|
|
||||||
x64hash = "1si5mkxbgb8m99bkvgc3l80idjfdp0kby6pv47s07nn43dbr1j7a";
|
|
||||||
x86hash = "07rfp90ksnvr8zv7ix7f0z6a59n48s7bd4kqbzilfwxgs4ddqmcy";
|
|
||||||
x64suffix = "19";
|
|
||||||
x86suffix = "19";
|
|
||||||
homepage = "https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-1912.html";
|
|
||||||
};
|
|
||||||
|
|
||||||
"20.04.0" = {
|
toAttrName = x: "citrix_workspace_${builtins.replaceStrings [ "." ] [ "_" ] x}";
|
||||||
major = "20";
|
|
||||||
minor = "04";
|
|
||||||
patch = "0";
|
|
||||||
x64hash = "E923592216F9541173846F932784E6C062CB09C9E8858219C7489607BF82A0FB";
|
|
||||||
x86hash = "A2E2E1882723DA6796E68916B3BB2B44DD575A83DEB03CA90A262F6C81B1A53F";
|
|
||||||
x64suffix = "21";
|
|
||||||
x86suffix = "21";
|
|
||||||
homepage = "https://www.citrix.com/de-de/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-2004.html";
|
|
||||||
};
|
|
||||||
|
|
||||||
"20.06.0" = {
|
unsupported = lib.listToAttrs (
|
||||||
major = "20";
|
map (x: lib.nameValuePair (toAttrName x) (throw ''
|
||||||
minor = "06";
|
Citrix Workspace at version ${x} is not supported anymore!
|
||||||
patch = "0";
|
|
||||||
x64hash = "1kpfcfg95mpprlca6cccnjlsqbj3xvv77cn3fc5msd304nsi9x1v";
|
|
||||||
x86hash = "1di29hrimbw3myjnf2nn26a14klidhdwvjqla6yxhwd3s6lil194";
|
|
||||||
x64suffix = "15";
|
|
||||||
x86suffix = "15";
|
|
||||||
homepage = "https://www.citrix.com/de-de/downloads/workspace-app/linux/workspace-app-for-linux-latest.html";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# The lifespans of Citrix products can be found here:
|
Actively supported releases are listed here:
|
||||||
# https://www.citrix.com/support/product-lifecycle/milestones/receiver.html
|
https://www.citrix.com/en-gb/support/product-lifecycle/milestones/receiver.html
|
||||||
deprecatedVersions = let
|
'')) unsupportedVersions
|
||||||
versions = [ "19.6.0" "19.8.0" "19.10.0" ];
|
);
|
||||||
in
|
|
||||||
lib.listToAttrs
|
|
||||||
(lib.forEach versions
|
|
||||||
(v: lib.nameValuePair v (throw ''
|
|
||||||
Unsupported citrix_workspace version: ${v}
|
|
||||||
|
|
||||||
Actively supported releases are listed here:
|
supported = lib.mapAttrs' (
|
||||||
https://www.citrix.com/en-gb/support/product-lifecycle/milestones/receiver.html
|
attr: versionInfo: lib.nameValuePair (toAttrName attr) (callPackage ./generic.nix versionInfo)
|
||||||
'')));
|
) supportedVersions;
|
||||||
in
|
in
|
||||||
deprecatedVersions // supportedVersions;
|
supported // unsupported
|
||||||
|
|
||||||
citrixWorkspaceForVersion = { major, minor, patch, x64hash, x86hash, x64suffix, x86suffix, homepage }:
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "citrix-workspace";
|
|
||||||
version = "${major}.${minor}.${patch}";
|
|
||||||
inherit homepage;
|
|
||||||
|
|
||||||
prefixWithBitness = if stdenv.is64bit then "linuxx64" else "linuxx86";
|
|
||||||
|
|
||||||
preferLocalBuild = true;
|
|
||||||
|
|
||||||
src = requireFile rec {
|
|
||||||
name = if stdenv.is64bit then "${prefixWithBitness}-${version}.${x64suffix}.tar.gz" else "${prefixWithBitness}-${version}.${x86suffix}.tar.gz";
|
|
||||||
sha256 = if stdenv.is64bit then x64hash else x86hash;
|
|
||||||
message = ''
|
|
||||||
In order to use Citrix Workspace, you need to comply with the Citrix EULA and download
|
|
||||||
the ${if stdenv.is64bit then "64-bit" else "32-bit"} binaries, .tar.gz from:
|
|
||||||
|
|
||||||
${homepage}
|
|
||||||
|
|
||||||
(if you do not find version ${version} there, try at
|
|
||||||
https://www.citrix.com/downloads/workspace-app/
|
|
||||||
|
|
||||||
Once you have downloaded the file, please use the following command and re-run the
|
|
||||||
installation:
|
|
||||||
|
|
||||||
nix-prefetch-url file://\$PWD/${name}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
dontBuild = true;
|
|
||||||
|
|
||||||
sourceRoot = ".";
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
makeWrapper
|
|
||||||
busybox
|
|
||||||
file
|
|
||||||
gtk2
|
|
||||||
gdk-pixbuf
|
|
||||||
];
|
|
||||||
|
|
||||||
libPath = stdenv.lib.makeLibraryPath [
|
|
||||||
glib
|
|
||||||
gtk2
|
|
||||||
atk
|
|
||||||
gdk-pixbuf
|
|
||||||
cairo
|
|
||||||
pango
|
|
||||||
dconf
|
|
||||||
xorg.libX11
|
|
||||||
xorg.libXext
|
|
||||||
xorg.libXrender
|
|
||||||
xorg.libXinerama
|
|
||||||
xorg.libXfixes
|
|
||||||
libpng12
|
|
||||||
zlib
|
|
||||||
gtk_engines
|
|
||||||
freetype
|
|
||||||
fontconfig
|
|
||||||
alsaLib
|
|
||||||
stdenv.cc.cc # Fixes: Can not load [..]/opt/citrix-icaclient/lib/ctxh264_fb.so:(null)
|
|
||||||
];
|
|
||||||
|
|
||||||
desktopItem = makeDesktopItem {
|
|
||||||
name = "wfica";
|
|
||||||
desktopName = "Citrix Workspace";
|
|
||||||
genericName = "Citrix Workspace";
|
|
||||||
exec = "wfica";
|
|
||||||
icon = "wfica";
|
|
||||||
comment = "Connect to remote Citrix server";
|
|
||||||
categories = "GTK;GNOME;X-GNOME-NetworkSettings;Network;";
|
|
||||||
mimeType = "application/x-ica";
|
|
||||||
};
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
export ICAInstDir="$out/opt/citrix-icaclient"
|
|
||||||
|
|
||||||
sed -i \
|
|
||||||
-e 's,^main_install_menu$,install_ICA_client,g' \
|
|
||||||
-e 's,^integrate_ICA_client(),alias integrate_ICA_client=true\nintegrate_ICA_client_old(),g' \
|
|
||||||
-e 's,^ANSWER=""$,ANSWER="$INSTALLER_YES",' \
|
|
||||||
-e 's,/bin/true,true,g' \
|
|
||||||
./${prefixWithBitness}/hinst
|
|
||||||
|
|
||||||
# Run the installer...
|
|
||||||
bash ./${prefixWithBitness}/hinst CDROM "`pwd`"
|
|
||||||
|
|
||||||
echo "Deleting broken links..."
|
|
||||||
for link in `find $ICAInstDir -type l `
|
|
||||||
do
|
|
||||||
[ -f "$link" ] || rm -v "$link"
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Expanding certificates..."
|
|
||||||
# As explained in https://wiki.archlinux.org/index.php/Citrix#Security_Certificates
|
|
||||||
pushd "$ICAInstDir/keystore/cacerts"
|
|
||||||
awk 'BEGIN {c=0;} /BEGIN CERT/{c++} { print > "cert." c ".pem"}' < ${cacert}/etc/ssl/certs/ca-bundle.crt
|
|
||||||
popd
|
|
||||||
|
|
||||||
echo "Patching executables..."
|
|
||||||
find $ICAInstDir -type f -exec file {} \; |
|
|
||||||
grep 'ELF.*executable' |
|
|
||||||
cut -f 1 -d : |
|
|
||||||
grep -vi '\(.dll\|.so\)$' | # added as a workaround to https://github.com/NixOS/nixpkgs/issues/41729
|
|
||||||
while read f
|
|
||||||
do
|
|
||||||
echo "Patching ELF intrepreter and rpath for $f"
|
|
||||||
chmod u+w "$f"
|
|
||||||
patchelf \
|
|
||||||
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
|
||||||
--set-rpath "$ICAInstDir:$libPath" "$f"
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Wrapping wfica..."
|
|
||||||
mkdir "$out/bin"
|
|
||||||
|
|
||||||
makeWrapper "$ICAInstDir/wfica" "$out/bin/wfica" \
|
|
||||||
--add-flags "-icaroot $ICAInstDir" \
|
|
||||||
--set ICAROOT "$ICAInstDir" \
|
|
||||||
--set GTK_PATH "${gtk2.out}/lib/gtk-2.0:${gnome3.gnome-themes-extra}/lib/gtk-2.0" \
|
|
||||||
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
|
|
||||||
--set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
|
|
||||||
--set LD_LIBRARY_PATH "$libPath" \
|
|
||||||
--set NIX_REDIRECTS "/usr/share/zoneinfo=${tzdata}/share/zoneinfo:/etc/zoneinfo=${tzdata}/share/zoneinfo:/etc/timezone=$ICAInstDir/timezone"
|
|
||||||
|
|
||||||
echo "We arbitrarily set the timezone to UTC. No known consequences at this point."
|
|
||||||
echo UTC > "$ICAInstDir/timezone"
|
|
||||||
|
|
||||||
echo "Installing desktop item..."
|
|
||||||
mkdir -p $out/share/applications
|
|
||||||
cp ${desktopItem}/share/applications/* $out/share/applications
|
|
||||||
|
|
||||||
# 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
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
|
||||||
license = stdenv.lib.licenses.unfree;
|
|
||||||
inherit homepage;
|
|
||||||
description = "Citrix Workspace";
|
|
||||||
platforms = platforms.linux;
|
|
||||||
maintainers = with maintainers; [ ma27 ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
in citrixWorkspaceForVersion (lib.getAttr version versionInfo)
|
|
||||||
|
203
pkgs/applications/networking/remote/citrix-workspace/generic.nix
Normal file
203
pkgs/applications/networking/remote/citrix-workspace/generic.nix
Normal file
@ -0,0 +1,203 @@
|
|||||||
|
{ stdenv, requireFile, makeWrapper, autoPatchelfHook, wrapGAppsHook, which, more
|
||||||
|
, file, atk, alsaLib, cairo, fontconfig, gdk-pixbuf, glib, gnome3, gtk2-x11, gtk3
|
||||||
|
, heimdal, krb5, libsoup, libvorbis, speex, openssl, zlib, xorg, pango, gtk2
|
||||||
|
, gnome2, nss, nspr, gtk_engines, freetype, dconf, libpng12, libxml2
|
||||||
|
, libjpeg, libredirect, tzdata, cacert, systemd, libcxxabi, libcxx, e2fsprogs, symlinkJoin
|
||||||
|
|
||||||
|
, homepage, version, prefix, hash
|
||||||
|
|
||||||
|
, extraCerts ? []
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (stdenv) lib;
|
||||||
|
|
||||||
|
openssl' = symlinkJoin {
|
||||||
|
name = "openssl-backwards-compat";
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
paths = [ openssl.out ];
|
||||||
|
postBuild = ''
|
||||||
|
ln -sf $out/lib/libcrypto.so $out/lib/libcrypto.so.1.0.0
|
||||||
|
ln -sf $out/lib/libssl.so $out/lib/libssl.so.1.0.0
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "citrix-workspace";
|
||||||
|
inherit version;
|
||||||
|
|
||||||
|
src = requireFile rec {
|
||||||
|
name = "${prefix}-${version}.tar.gz";
|
||||||
|
sha256 = hash;
|
||||||
|
|
||||||
|
message = ''
|
||||||
|
In order to use Citrix Workspace, you need to comply with the Citrix EULA and download
|
||||||
|
the ${if stdenv.is64bit then "64-bit" else "32-bit"} binaries, .tar.gz from:
|
||||||
|
|
||||||
|
${homepage}
|
||||||
|
|
||||||
|
(if you do not find version ${version} there, try at
|
||||||
|
https://www.citrix.com/downloads/workspace-app/
|
||||||
|
|
||||||
|
Once you have downloaded the file, please use the following command and re-run the
|
||||||
|
installation:
|
||||||
|
|
||||||
|
nix-prefetch-url file://\$PWD/${name}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
dontBuild = true;
|
||||||
|
dontConfigure = true;
|
||||||
|
sourceRoot = ".";
|
||||||
|
preferLocalBuild = true;
|
||||||
|
passthru.icaroot = "${placeholder "out"}/opt/citrix-icaclient";
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
autoPatchelfHook
|
||||||
|
file
|
||||||
|
makeWrapper
|
||||||
|
more
|
||||||
|
which
|
||||||
|
wrapGAppsHook
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
alsaLib
|
||||||
|
atk
|
||||||
|
cairo
|
||||||
|
dconf
|
||||||
|
fontconfig
|
||||||
|
freetype
|
||||||
|
gdk-pixbuf
|
||||||
|
gnome2.gtkglext
|
||||||
|
gnome3.webkitgtk
|
||||||
|
gtk2
|
||||||
|
gtk2-x11
|
||||||
|
gtk3
|
||||||
|
gtk_engines
|
||||||
|
heimdal
|
||||||
|
krb5
|
||||||
|
libcxx
|
||||||
|
libcxxabi
|
||||||
|
libjpeg
|
||||||
|
libpng12
|
||||||
|
libsoup
|
||||||
|
libvorbis
|
||||||
|
libxml2
|
||||||
|
nspr
|
||||||
|
nss
|
||||||
|
openssl'
|
||||||
|
pango
|
||||||
|
speex
|
||||||
|
systemd.lib
|
||||||
|
stdenv.cc.cc
|
||||||
|
xorg.libXaw
|
||||||
|
xorg.libXmu
|
||||||
|
xorg.libXScrnSaver
|
||||||
|
xorg.libXtst
|
||||||
|
zlib
|
||||||
|
] ++ lib.optional (lib.versionOlder version "20.04") e2fsprogs;
|
||||||
|
|
||||||
|
runtimeDependencies = [
|
||||||
|
glib
|
||||||
|
|
||||||
|
xorg.libX11
|
||||||
|
xorg.libXScrnSaver
|
||||||
|
xorg.libXext
|
||||||
|
xorg.libXfixes
|
||||||
|
xorg.libXinerama
|
||||||
|
xorg.libXmu
|
||||||
|
xorg.libXrender
|
||||||
|
xorg.libXtst
|
||||||
|
xorg.libxcb
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = let
|
||||||
|
icaFlag = program:
|
||||||
|
if (builtins.match "selfservice(.*)" program) != null then "--icaroot"
|
||||||
|
else "-icaroot";
|
||||||
|
wrap = program: ''
|
||||||
|
wrapProgram $out/opt/citrix-icaclient/${program} \
|
||||||
|
--add-flags "${icaFlag program} $ICAInstDir" \
|
||||||
|
--set ICAROOT "$ICAInstDir" \
|
||||||
|
--prefix LD_LIBRARY_PATH : "$ICAInstDir:$ICAInstDir/lib" \
|
||||||
|
--set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
|
||||||
|
--set NIX_REDIRECTS "/usr/share/zoneinfo=${tzdata}/share/zoneinfo:/etc/zoneinfo=${tzdata}/share/zoneinfo:/etc/timezone=$ICAInstDir/timezone"
|
||||||
|
'';
|
||||||
|
wrapLink = program: ''
|
||||||
|
${wrap program}
|
||||||
|
ln -sf $out/opt/citrix-icaclient/${program} $out/bin/${baseNameOf program}
|
||||||
|
'';
|
||||||
|
|
||||||
|
copyCert = path: ''
|
||||||
|
cp -v ${path} $out/opt/citrix-icaclient/keystore/cacerts/${baseNameOf path}
|
||||||
|
'';
|
||||||
|
|
||||||
|
mkWrappers = lib.concatMapStringsSep "\n";
|
||||||
|
|
||||||
|
toWrap = [ "wfica" "selfservice" "util/configmgr" "util/conncenter" "util/ctx_rehash" ]
|
||||||
|
++ lib.optional (lib.versionOlder version "20.06") "selfservice_old";
|
||||||
|
in ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/{bin,share/applications}
|
||||||
|
export ICAInstDir="$out/opt/citrix-icaclient"
|
||||||
|
export HOME=$(mktemp -d)
|
||||||
|
|
||||||
|
# Run upstream installer in the store-path.
|
||||||
|
sed -i -e 's,^ANSWER="",ANSWER="$INSTALLER_YES",g' -e 's,/bin/true,true,g' ./linuxx64/hinst
|
||||||
|
${stdenv.shell} linuxx64/hinst CDROM "$(pwd)"
|
||||||
|
|
||||||
|
${mkWrappers wrapLink toWrap}
|
||||||
|
${mkWrappers wrap [ "PrimaryAuthManager" "ServiceRecord" "AuthManagerDaemon" "util/ctxwebhelper" ]}
|
||||||
|
|
||||||
|
ln -sf $ICAInstDir/util/storebrowse $out/bin/storebrowse
|
||||||
|
|
||||||
|
# As explained in https://wiki.archlinux.org/index.php/Citrix#Security_Certificates
|
||||||
|
echo "Expanding certificates..."
|
||||||
|
pushd "$ICAInstDir/keystore/cacerts"
|
||||||
|
awk 'BEGIN {c=0;} /BEGIN CERT/{c++} { print > "cert." c ".pem"}' \
|
||||||
|
< ${cacert}/etc/ssl/certs/ca-bundle.crt
|
||||||
|
popd
|
||||||
|
|
||||||
|
${mkWrappers copyCert extraCerts}
|
||||||
|
|
||||||
|
# See https://developer-docs.citrix.com/projects/workspace-app-for-linux-oem-guide/en/latest/reference-information/#library-files
|
||||||
|
# Those files are fallbacks to support older libwekit.so and libjpeg.so
|
||||||
|
rm $out/opt/citrix-icaclient/lib/ctxjpeg_fb_8.so
|
||||||
|
rm $out/opt/citrix-icaclient/lib/UIDialogLibWebKit.so
|
||||||
|
|
||||||
|
# We support only Gstreamer 1.0
|
||||||
|
rm $ICAInstDir/util/{gst_aud_{play,read},gst_*0.10,libgstflatstm0.10.so}
|
||||||
|
ln -sf $ICAInstDir/util/gst_play1.0 $ICAInstDir/util/gst_play
|
||||||
|
ln -sf $ICAInstDir/util/gst_read1.0 $ICAInstDir/util/gst_read
|
||||||
|
|
||||||
|
echo "We arbitrarily set the timezone to UTC. No known consequences at this point."
|
||||||
|
echo UTC > "$ICAInstDir/timezone"
|
||||||
|
|
||||||
|
echo "Copy .desktop files."
|
||||||
|
cp $out/opt/citrix-icaclient/desktop/* $out/share/applications/
|
||||||
|
|
||||||
|
# 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
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Make sure that `autoPatchelfHook` is executed before
|
||||||
|
# running `ctx_rehash`.
|
||||||
|
dontAutoPatchelf = true;
|
||||||
|
postFixup = ''
|
||||||
|
autoPatchelf -- "$out"
|
||||||
|
$out/opt/citrix-icaclient/util/ctx_rehash
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
license = licenses.unfree;
|
||||||
|
description = "Citrix Workspace";
|
||||||
|
platforms = platforms.linux;
|
||||||
|
maintainers = with maintainers; [ ma27 ];
|
||||||
|
inherit homepage;
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
{ stdenv, lib }:
|
||||||
|
|
||||||
|
let
|
||||||
|
mkVersionInfo = _: { major, minor, patch, x64hash, x86hash, x64suffix, x86suffix, homepage }:
|
||||||
|
{ inherit homepage;
|
||||||
|
version = "${major}.${minor}.${patch}.${if stdenv.is64bit then x64suffix else x86suffix}";
|
||||||
|
prefix = "linuxx${if stdenv.is64bit then "64" else "86"}";
|
||||||
|
hash = if stdenv.is64bit then x64hash else x86hash;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Attribute-set with all actively supported versions of the Citrix workspace app
|
||||||
|
# for Linux.
|
||||||
|
#
|
||||||
|
# The latest versions can be found at https://www.citrix.com/de-de/downloads/workspace-app/linux/
|
||||||
|
supportedVersions = lib.mapAttrs mkVersionInfo {
|
||||||
|
"19.12.0" = {
|
||||||
|
major = "19";
|
||||||
|
minor = "12";
|
||||||
|
patch = "0";
|
||||||
|
x64hash = "1si5mkxbgb8m99bkvgc3l80idjfdp0kby6pv47s07nn43dbr1j7a";
|
||||||
|
x86hash = "07rfp90ksnvr8zv7ix7f0z6a59n48s7bd4kqbzilfwxgs4ddqmcy";
|
||||||
|
x64suffix = "19";
|
||||||
|
x86suffix = "19";
|
||||||
|
homepage = "https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-1912.html";
|
||||||
|
};
|
||||||
|
|
||||||
|
"20.04.0" = {
|
||||||
|
major = "20";
|
||||||
|
minor = "04";
|
||||||
|
patch = "0";
|
||||||
|
x64hash = "E923592216F9541173846F932784E6C062CB09C9E8858219C7489607BF82A0FB";
|
||||||
|
x86hash = "A2E2E1882723DA6796E68916B3BB2B44DD575A83DEB03CA90A262F6C81B1A53F";
|
||||||
|
x64suffix = "21";
|
||||||
|
x86suffix = "21";
|
||||||
|
homepage = "https://www.citrix.com/downloads/workspace-app/linux/workspace-app-for-linux-latest.html";
|
||||||
|
};
|
||||||
|
|
||||||
|
"20.06.0" = {
|
||||||
|
major = "20";
|
||||||
|
minor = "06";
|
||||||
|
patch = "0";
|
||||||
|
x64hash = "1kpfcfg95mpprlca6cccnjlsqbj3xvv77cn3fc5msd304nsi9x1v";
|
||||||
|
x86hash = "1di29hrimbw3myjnf2nn26a14klidhdwvjqla6yxhwd3s6lil194";
|
||||||
|
x64suffix = "15";
|
||||||
|
x86suffix = "15";
|
||||||
|
homepage = "https://www.citrix.com/de-de/downloads/workspace-app/linux/workspace-app-for-linux-latest.html";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Retain attribute-names for abandoned versions of Citrix workspace to
|
||||||
|
# provide a meaningful error-message if it's attempted to use such an old one.
|
||||||
|
#
|
||||||
|
# The lifespans of Citrix products can be found here:
|
||||||
|
# https://www.citrix.com/support/product-lifecycle/milestones/receiver.html
|
||||||
|
unsupportedVersions = [ "19.6.0" "19.8.0" "19.10.0" ];
|
||||||
|
in {
|
||||||
|
inherit supportedVersions unsupportedVersions;
|
||||||
|
}
|
@ -1,19 +0,0 @@
|
|||||||
{ citrix_workspace, extraCerts ? [], symlinkJoin }:
|
|
||||||
|
|
||||||
let
|
|
||||||
|
|
||||||
mkCertCopy = certPath:
|
|
||||||
"cp ${certPath} $out/opt/citrix-icaclient/keystore/cacerts/";
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
if builtins.length extraCerts == 0 then citrix_workspace else symlinkJoin {
|
|
||||||
name = "citrix-with-extra-certs-${citrix_workspace.version}";
|
|
||||||
paths = [ citrix_workspace ];
|
|
||||||
|
|
||||||
postBuild = ''
|
|
||||||
${builtins.concatStringsSep "\n" (map mkCertCopy extraCerts)}
|
|
||||||
|
|
||||||
sed -i -E "s,-icaroot (.+citrix-icaclient),-icaroot $out/opt/citrix-icaclient," $out/bin/wfica
|
|
||||||
'';
|
|
||||||
}
|
|
@ -2569,33 +2569,16 @@ in
|
|||||||
|
|
||||||
circus = callPackage ../tools/networking/circus { };
|
circus = callPackage ../tools/networking/circus { };
|
||||||
|
|
||||||
citrix_workspace_unwrapped = callPackage ../applications/networking/remote/citrix-workspace { };
|
|
||||||
citrix_workspace_unwrapped_20_06_0 = citrix_workspace_unwrapped.override { version = "20.06.0"; };
|
|
||||||
citrix_workspace_unwrapped_20_04_0 = citrix_workspace_unwrapped.override { version = "20.04.0"; };
|
|
||||||
citrix_workspace_unwrapped_19_12_0 = citrix_workspace_unwrapped.override { version = "19.12.0"; };
|
|
||||||
citrix_workspace_unwrapped_19_10_0 = citrix_workspace_unwrapped.override { version = "19.10.0"; };
|
|
||||||
citrix_workspace_unwrapped_19_8_0 = citrix_workspace_unwrapped.override { version = "19.8.0"; };
|
|
||||||
citrix_workspace_unwrapped_19_6_0 = citrix_workspace_unwrapped.override { version = "19.6.0"; };
|
|
||||||
|
|
||||||
citrix_workspace = citrix_workspace_20_06_0;
|
citrix_workspace = citrix_workspace_20_06_0;
|
||||||
citrix_workspace_20_06_0 = callPackage ../applications/networking/remote/citrix-workspace/wrapper.nix {
|
|
||||||
citrix_workspace = citrix_workspace_unwrapped_20_06_0;
|
inherit (callPackage ../applications/networking/remote/citrix-workspace { })
|
||||||
};
|
citrix_workspace_19_6_0
|
||||||
citrix_workspace_20_04_0 = callPackage ../applications/networking/remote/citrix-workspace/wrapper.nix {
|
citrix_workspace_19_8_0
|
||||||
citrix_workspace = citrix_workspace_unwrapped_20_04_0;
|
citrix_workspace_19_10_0
|
||||||
};
|
citrix_workspace_19_12_0
|
||||||
citrix_workspace_19_12_0 = callPackage ../applications/networking/remote/citrix-workspace/wrapper.nix {
|
citrix_workspace_20_04_0
|
||||||
citrix_workspace = citrix_workspace_unwrapped_19_12_0;
|
citrix_workspace_20_06_0
|
||||||
};
|
;
|
||||||
citrix_workspace_19_10_0 = callPackage ../applications/networking/remote/citrix-workspace/wrapper.nix {
|
|
||||||
citrix_workspace = citrix_workspace_unwrapped_19_10_0;
|
|
||||||
};
|
|
||||||
citrix_workspace_19_8_0 = callPackage ../applications/networking/remote/citrix-workspace/wrapper.nix {
|
|
||||||
citrix_workspace = citrix_workspace_unwrapped_19_8_0;
|
|
||||||
};
|
|
||||||
citrix_workspace_19_6_0 = callPackage ../applications/networking/remote/citrix-workspace/wrapper.nix {
|
|
||||||
citrix_workspace = citrix_workspace_unwrapped_19_6_0;
|
|
||||||
};
|
|
||||||
|
|
||||||
citra = libsForQt5.callPackage ../misc/emulators/citra { };
|
citra = libsForQt5.callPackage ../misc/emulators/citra { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user