citrix_receiver: refactor so older versions can still be installed
Version 13.4.0 is the latest version that doesn't suffer from the bug described at https://discussions.citrix.com/topic/385459-ssl-error-with-135-works-with-134/page-2#entry1977735 As a result, upgrades to 13.5.0, 13.6.0 and 13.7.0 were postponed. However some users aren't affected by this big. This enables everyone to download the version that suits their needs. Related to: #23975, #27664, #30029
This commit is contained in:
parent
32866a3b0b
commit
26122b368a
@ -1,4 +1,5 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
|
, lib
|
||||||
, requireFile
|
, requireFile
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, libredirect
|
, libredirect
|
||||||
@ -22,154 +23,198 @@
|
|||||||
, alsaLib
|
, alsaLib
|
||||||
, libidn
|
, libidn
|
||||||
, zlib
|
, zlib
|
||||||
|
, version ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let versionRec = { major = "13"; minor = "7"; patch = "0"; };
|
let
|
||||||
in stdenv.mkDerivation rec {
|
versionInfo = {
|
||||||
name = "citrix-receiver-${version}";
|
"13.4.0" = rec {
|
||||||
version = with versionRec; "${major}.${minor}.${patch}";
|
major = "13";
|
||||||
homepage = https://www.citrix.com/downloads/citrix-receiver/linux/receiver-for-linux-latest.html;
|
minor = "4";
|
||||||
|
patch = "0";
|
||||||
|
x64hash = "133brs0sq6d0mgr19rc6ig1n9ahm3ryi23v5nrgqfh0hgxqcrrjb";
|
||||||
|
x86hash = "0r7jfl5yqv1s2npy8l9gsn0gbb82f6raa092ppkc8xy5pni5sh7l";
|
||||||
|
x64suffix = "10109380";
|
||||||
|
x86suffix = x64suffix;
|
||||||
|
homepage = https://www.citrix.com/downloads/citrix-receiver/legacy-receiver-for-linux/receiver-for-linux-latest-13-4.html;
|
||||||
|
};
|
||||||
|
|
||||||
prefixWithBitness = if stdenv.is64bit then "linuxx64" else "linuxx86";
|
"13.5.0" = rec {
|
||||||
|
major = "13";
|
||||||
|
minor = "5";
|
||||||
|
patch = "0";
|
||||||
|
x64hash = "1r24mhkpcc0z95n597p07fz92pd1b8qqzp2z6w07rmb9wb8mpd4x";
|
||||||
|
x86hash = "0pwxshlryzhkl86cj9ryybm54alhzjx0gpp67fnvdn5r64wy1nd1";
|
||||||
|
x64suffix = "10185126";
|
||||||
|
x86suffix = x64suffix;
|
||||||
|
homepage = https://www.citrix.com/downloads/citrix-receiver/legacy-receiver-for-linux/receiver-for-linux-latest-13-5.html;
|
||||||
|
};
|
||||||
|
|
||||||
src = with versionRec; requireFile rec {
|
"13.6.0" = rec {
|
||||||
name =
|
major = "13";
|
||||||
if stdenv.is64bit
|
minor = "6";
|
||||||
then "${prefixWithBitness}-${version}.10276927.tar.gz"
|
patch = "0";
|
||||||
else "${prefixWithBitness}-${version}.10276925.tar.gz";
|
x64hash = "6e423be41d5bb8186bcca3fbb4ede54dc3f00b8d2aeb216ae4aabffef9310d34";
|
||||||
sha256 =
|
x86hash = "0ba3eba208b37844904d540b3011075ed5cecf429a0ab6c6cd52f2d0fd841ad2";
|
||||||
if stdenv.is64bit
|
x64suffix = "10243651";
|
||||||
then "18fb374b9fb8e249b79178500dddca7a1f275411c6537e7695da5dcf19c5ba91"
|
x86suffix = x64suffix;
|
||||||
else "4c68723b0327cf6f12da824056fce2b7853c38e6163a48c9d222b93dd8da75b6";
|
homepage = https://www.citrix.com/downloads/citrix-receiver/legacy-receiver-for-linux/receiver-for-linux-136.html;
|
||||||
message = ''
|
};
|
||||||
In order to use Citrix Receiver, 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}
|
"13.7.0" = {
|
||||||
|
major = "13";
|
||||||
(if you do not find version ${version} there, try at
|
minor = "7";
|
||||||
https://www.citrix.com/downloads/citrix-receiver/legacy-receiver-for-linux/receiver-for-linux-latest-${major}-${minor}.html
|
patch = "0";
|
||||||
or at https://www.citrix.com/downloads/citrix-receiver/ under "Earlier Versions of Receiver for Linux")
|
x64hash = "18fb374b9fb8e249b79178500dddca7a1f275411c6537e7695da5dcf19c5ba91";
|
||||||
|
x86hash = "4c68723b0327cf6f12da824056fce2b7853c38e6163a48c9d222b93dd8da75b6";
|
||||||
Once you have downloaded the file, please use the following command and re-run the
|
homepage = https://www.citrix.com/downloads/citrix-receiver/linux/receiver-for-linux-latest.html; # Fix when updating version
|
||||||
installation:
|
x64suffix = "10276927";
|
||||||
|
x86suffix = "10276925";
|
||||||
nix-prefetch-url file://\$PWD/${name}
|
};
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
phases = [ "unpackPhase" "installPhase" ];
|
citrixReceiverForVersion = { major, minor, patch, x86hash, x64hash, x86suffix, x64suffix, homepage }:
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "citrix-receiver-${version}";
|
||||||
|
version = "${major}.${minor}.${patch}";
|
||||||
|
inherit homepage;
|
||||||
|
|
||||||
sourceRoot = ".";
|
prefixWithBitness = if stdenv.is64bit then "linuxx64" else "linuxx86";
|
||||||
|
|
||||||
buildInputs = [
|
src = requireFile rec {
|
||||||
makeWrapper
|
name = if stdenv.is64bit then "${prefixWithBitness}-${version}.${x64suffix}.tar.gz" else "${prefixWithBitness}-${version}.${x86suffix}.tar.gz";
|
||||||
busybox
|
sha256 = if stdenv.is64bit then x64hash else x86hash;
|
||||||
file
|
message = ''
|
||||||
gtk2
|
In order to use Citrix Receiver, you need to comply with the Citrix EULA and download
|
||||||
gdk_pixbuf
|
the ${if stdenv.is64bit then "64-bit" else "32-bit"} binaries, .tar.gz from:
|
||||||
];
|
|
||||||
|
|
||||||
libPath = stdenv.lib.makeLibraryPath [
|
${homepage}
|
||||||
glib
|
|
||||||
gtk2
|
|
||||||
atk
|
|
||||||
gdk_pixbuf
|
|
||||||
cairo
|
|
||||||
pango
|
|
||||||
gnome3.dconf
|
|
||||||
xlibs.libX11
|
|
||||||
xlibs.libXext
|
|
||||||
xlibs.libXrender
|
|
||||||
xlibs.libXinerama
|
|
||||||
xlibs.libXfixes
|
|
||||||
libpng12
|
|
||||||
libidn
|
|
||||||
zlib
|
|
||||||
gtk_engines
|
|
||||||
freetype
|
|
||||||
fontconfig
|
|
||||||
alsaLib
|
|
||||||
stdenv.cc.cc # Fixes: Can not load [..]/opt/citrix-icaclient/lib/ctxh264_fb.so:(null)
|
|
||||||
];
|
|
||||||
|
|
||||||
desktopItem = makeDesktopItem {
|
(if you do not find version ${version} there, try at
|
||||||
name = "wfica";
|
https://www.citrix.com/downloads/citrix-receiver/legacy-receiver-for-linux/
|
||||||
desktopName = "Citrix Receiver";
|
or at https://www.citrix.com/downloads/citrix-receiver/ under "Earlier Versions of Receiver for Linux")
|
||||||
genericName = "Citrix Receiver";
|
|
||||||
exec = "wfica";
|
|
||||||
icon = "wfica";
|
|
||||||
comment = "Connect to remote Citrix server";
|
|
||||||
categories = "GTK;GNOME;X-GNOME-NetworkSettings;Network;";
|
|
||||||
mimeType = "application/x-ica";
|
|
||||||
};
|
|
||||||
|
|
||||||
installPhase = ''
|
Once you have downloaded the file, please use the following command and re-run the
|
||||||
export ICAInstDir="$out/opt/citrix-icaclient"
|
installation:
|
||||||
|
|
||||||
sed -i \
|
nix-prefetch-url file://\$PWD/${name}
|
||||||
-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...
|
phases = [ "unpackPhase" "installPhase" ];
|
||||||
./${prefixWithBitness}/hinst CDROM "`pwd`"
|
|
||||||
|
|
||||||
echo "Deleting broken links..."
|
sourceRoot = ".";
|
||||||
for link in `find $ICAInstDir -type l `
|
|
||||||
do
|
|
||||||
[ -f "$link" ] || rm -v "$link"
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Expanding certificates..."
|
buildInputs = [
|
||||||
# As explained in https://wiki.archlinux.org/index.php/Citrix#Security_Certificates
|
makeWrapper
|
||||||
pushd "$ICAInstDir/keystore/cacerts"
|
busybox
|
||||||
awk 'BEGIN {c=0;} /BEGIN CERT/{c++} { print > "cert." c ".pem"}' < ${cacert}/etc/ssl/certs/ca-bundle.crt
|
file
|
||||||
popd
|
gtk2
|
||||||
|
gdk_pixbuf
|
||||||
|
];
|
||||||
|
|
||||||
echo "Patching executables..."
|
libPath = stdenv.lib.makeLibraryPath [
|
||||||
find $ICAInstDir -type f -exec file {} \; |
|
glib
|
||||||
grep 'ELF.*executable' |
|
gtk2
|
||||||
cut -f 1 -d : |
|
atk
|
||||||
while read f
|
gdk_pixbuf
|
||||||
do
|
cairo
|
||||||
echo "Patching ELF intrepreter and rpath for $f"
|
pango
|
||||||
chmod u+w "$f"
|
gnome3.dconf
|
||||||
patchelf \
|
xlibs.libX11
|
||||||
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
xlibs.libXext
|
||||||
--set-rpath "$ICAInstDir:$libPath" "$f"
|
xlibs.libXrender
|
||||||
done
|
xlibs.libXinerama
|
||||||
|
xlibs.libXfixes
|
||||||
|
libpng12
|
||||||
|
libidn
|
||||||
|
zlib
|
||||||
|
gtk_engines
|
||||||
|
freetype
|
||||||
|
fontconfig
|
||||||
|
alsaLib
|
||||||
|
stdenv.cc.cc # Fixes: Can not load [..]/opt/citrix-icaclient/lib/ctxh264_fb.so:(null)
|
||||||
|
];
|
||||||
|
|
||||||
echo "Wrapping wfica..."
|
desktopItem = makeDesktopItem {
|
||||||
mkdir "$out/bin"
|
name = "wfica";
|
||||||
|
desktopName = "Citrix Receiver";
|
||||||
|
genericName = "Citrix Receiver";
|
||||||
|
exec = "wfica";
|
||||||
|
icon = "wfica";
|
||||||
|
comment = "Connect to remote Citrix server";
|
||||||
|
categories = "GTK;GNOME;X-GNOME-NetworkSettings;Network;";
|
||||||
|
mimeType = "application/x-ica";
|
||||||
|
};
|
||||||
|
|
||||||
makeWrapper "$ICAInstDir/wfica" "$out/bin/wfica" \
|
installPhase = ''
|
||||||
--add-flags "-icaroot $ICAInstDir" \
|
export ICAInstDir="$out/opt/citrix-icaclient"
|
||||||
--set ICAROOT "$ICAInstDir" \
|
|
||||||
--set GTK_PATH "${gtk2.out}/lib/gtk-2.0:${gnome3.gnome_themes_standard}/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."
|
sed -i \
|
||||||
echo UTC > "$ICAInstDir/timezone"
|
-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
|
||||||
|
|
||||||
echo "Installing desktop item..."
|
# Run the installer...
|
||||||
mkdir -p $out/share/applications
|
./${prefixWithBitness}/hinst CDROM "`pwd`"
|
||||||
cp ${desktopItem}/share/applications/* $out/share/applications
|
|
||||||
|
|
||||||
# We introduce a dependency on the source file so that it need not be redownloaded everytime
|
echo "Deleting broken links..."
|
||||||
echo $src >> "$out/share/nix_dependencies.pin"
|
for link in `find $ICAInstDir -type l `
|
||||||
'';
|
do
|
||||||
|
[ -f "$link" ] || rm -v "$link"
|
||||||
|
done
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
echo "Expanding certificates..."
|
||||||
license = stdenv.lib.licenses.unfree;
|
# As explained in https://wiki.archlinux.org/index.php/Citrix#Security_Certificates
|
||||||
homepage = homepage;
|
pushd "$ICAInstDir/keystore/cacerts"
|
||||||
description = "Citrix Receiver";
|
awk 'BEGIN {c=0;} /BEGIN CERT/{c++} { print > "cert." c ".pem"}' < ${cacert}/etc/ssl/certs/ca-bundle.crt
|
||||||
maintainers = with maintainers; [ obadz a1russell ];
|
popd
|
||||||
platforms = platforms.linux;
|
|
||||||
};
|
echo "Patching executables..."
|
||||||
}
|
find $ICAInstDir -type f -exec file {} \; |
|
||||||
|
grep 'ELF.*executable' |
|
||||||
|
cut -f 1 -d : |
|
||||||
|
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_standard}/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/nix_dependencies.pin"
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
license = stdenv.lib.licenses.unfree;
|
||||||
|
inherit homepage;
|
||||||
|
description = "Citrix Receiver";
|
||||||
|
maintainers = with maintainers; [ obadz a1russell ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
in citrixReceiverForVersion (lib.getAttr version versionInfo)
|
||||||
|
@ -1398,7 +1398,13 @@ with pkgs;
|
|||||||
|
|
||||||
ciopfs = callPackage ../tools/filesystems/ciopfs { };
|
ciopfs = callPackage ../tools/filesystems/ciopfs { };
|
||||||
|
|
||||||
citrix_receiver = callPackage ../applications/networking/remote/citrix-receiver { };
|
# Use Citrix Receiver 13.4.0 below if you get "A network error occured (SSL error 4)"
|
||||||
|
# See https://discussions.citrix.com/topic/385459-ssl-error-with-135-works-with-134/?p=1977735
|
||||||
|
citrix_receiver = hiPrio citrix_receiver_13_7_0;
|
||||||
|
citrix_receiver_13_7_0 = callPackage ../applications/networking/remote/citrix-receiver { version = "13.7.0"; };
|
||||||
|
citrix_receiver_13_6_0 = callPackage ../applications/networking/remote/citrix-receiver { version = "13.6.0"; };
|
||||||
|
citrix_receiver_13_5_0 = callPackage ../applications/networking/remote/citrix-receiver { version = "13.5.0"; };
|
||||||
|
citrix_receiver_13_4_0 = callPackage ../applications/networking/remote/citrix-receiver { version = "13.4.0"; };
|
||||||
|
|
||||||
citra = libsForQt5.callPackage ../misc/emulators/citra { };
|
citra = libsForQt5.callPackage ../misc/emulators/citra { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user