uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, callPackage }:
|
||||
|
||||
# For detailed information about the Citrix source-tarball, please refer to the OEM
|
||||
# reference guide: https://developer-docs.citrix.com/projects/workspace-app-for-linux-oem-guide/en/latest/
|
||||
|
||||
let
|
||||
inherit (callPackage ./sources.nix { }) supportedVersions unsupportedVersions;
|
||||
mkCitrix = callPackage ./generic.nix { };
|
||||
|
||||
toAttrName = x: "citrix_workspace_${builtins.replaceStrings [ "." ] [ "_" ] x}";
|
||||
|
||||
unsupported = lib.listToAttrs (
|
||||
map (x: lib.nameValuePair (toAttrName x) (throw ''
|
||||
Citrix Workspace at version ${x} is not supported anymore!
|
||||
|
||||
Actively supported releases are listed here:
|
||||
https://www.citrix.com/support/product-lifecycle/milestones/receiver.html
|
||||
'')) unsupportedVersions
|
||||
);
|
||||
|
||||
supported = lib.mapAttrs' (
|
||||
attr: versionInfo: lib.nameValuePair (toAttrName attr) (callPackage ./generic.nix versionInfo)
|
||||
) supportedVersions;
|
||||
in
|
||||
supported // unsupported
|
||||
213
pkgs/applications/networking/remote/citrix-workspace/generic.nix
Normal file
213
pkgs/applications/networking/remote/citrix-workspace/generic.nix
Normal file
|
|
@ -0,0 +1,213 @@
|
|||
{ lib, stdenv, requireFile, makeWrapper, autoPatchelfHook, wrapGAppsHook, which, more
|
||||
, file, atk, alsa-lib, cairo, fontconfig, gdk-pixbuf, glib, webkitgtk, gtk2-x11, gtk3
|
||||
, heimdal, krb5, libsoup, libvorbis, speex, openssl, zlib, xorg, pango, gtk2
|
||||
, gnome2, mesa, nss, nspr, gtk_engines, freetype, dconf, libpng12, libxml2
|
||||
, libjpeg, libredirect, tzdata, cacert, systemd, libcxxabi, libcxx, e2fsprogs, symlinkJoin
|
||||
, libpulseaudio, pcsclite, glib-networking, llvmPackages_12
|
||||
|
||||
, homepage, version, prefix, hash
|
||||
|
||||
, extraCerts ? []
|
||||
}:
|
||||
|
||||
let
|
||||
openssl' = symlinkJoin {
|
||||
name = "openssl-backwards-compat";
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
paths = [ (lib.getLib openssl) ];
|
||||
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 = [
|
||||
alsa-lib
|
||||
atk
|
||||
cairo
|
||||
dconf
|
||||
fontconfig
|
||||
freetype
|
||||
gdk-pixbuf
|
||||
gnome2.gtkglext
|
||||
glib-networking
|
||||
webkitgtk
|
||||
gtk2
|
||||
gtk2-x11
|
||||
gtk3
|
||||
gtk_engines
|
||||
heimdal
|
||||
krb5
|
||||
libcxx
|
||||
libcxxabi
|
||||
libjpeg
|
||||
libpng12
|
||||
libsoup
|
||||
libvorbis
|
||||
libxml2
|
||||
mesa
|
||||
nspr
|
||||
nss
|
||||
openssl'
|
||||
pango
|
||||
speex
|
||||
(lib.getLib systemd)
|
||||
stdenv.cc.cc
|
||||
xorg.libXaw
|
||||
xorg.libXmu
|
||||
xorg.libXScrnSaver
|
||||
xorg.libXtst
|
||||
zlib
|
||||
] ++ lib.optional (lib.versionOlder version "20.04") e2fsprogs
|
||||
++ lib.optional (lib.versionAtLeast version "20.10") libpulseaudio
|
||||
++ lib.optional (lib.versionAtLeast version "21.12") llvmPackages_12.libunwind;
|
||||
|
||||
runtimeDependencies = [
|
||||
glib
|
||||
glib-networking
|
||||
pcsclite
|
||||
|
||||
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 if (lib.versionAtLeast version "21.12" && builtins.match "wfica(.*)" program != null) then null
|
||||
else "-icaroot";
|
||||
wrap = program: ''
|
||||
wrapProgram $out/opt/citrix-icaclient/${program} \
|
||||
${lib.optionalString (icaFlag program != null) ''--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' ./${prefix}/hinst
|
||||
${stdenv.shell} ${prefix}/hinst CDROM "$(pwd)"
|
||||
|
||||
if [ -f "$ICAInstDir/util/setlog" ]; then
|
||||
chmod +x "$ICAInstDir/util/setlog"
|
||||
ln -sf "$ICAInstDir/util/setlog" "$out/bin/citrix-setlog"
|
||||
fi
|
||||
${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 || true
|
||||
rm $out/opt/citrix-icaclient/lib/UIDialogLibWebKit.so || true
|
||||
|
||||
# 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; [ pmenke michaeladler ];
|
||||
inherit homepage;
|
||||
};
|
||||
}
|
||||
102
pkgs/applications/networking/remote/citrix-workspace/sources.nix
Normal file
102
pkgs/applications/networking/remote/citrix-workspace/sources.nix
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
{ 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/downloads/workspace-app/linux/
|
||||
supportedVersions = lib.mapAttrs mkVersionInfo {
|
||||
"21.01.0" = {
|
||||
major = "21";
|
||||
minor = "1";
|
||||
patch = "0";
|
||||
x64hash = "01m9g1bs6iiqbd778gjps2zznvqijlyn3mfw38aa0w1rr6ms326a";
|
||||
x86hash = "1mmx5r3wi9i6bwh4kdlpw446m8kijkaar8shi0q1n21fv0ygg3r5";
|
||||
x64suffix = "14";
|
||||
x86suffix = "14";
|
||||
homepage = "https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-2101.html";
|
||||
};
|
||||
|
||||
"21.03.0" = {
|
||||
major = "21";
|
||||
minor = "3";
|
||||
patch = "0";
|
||||
x64hash = "004pgvxl81l99sqvrs5xzvjivjlc21rrlm2gky9hmbsm53nsl3zc";
|
||||
x86hash = "11nn9734a515dm1q880z9wmhvx8ikyh3riayyn42z22q4kd852n3";
|
||||
x64suffix = "38";
|
||||
x86suffix = "38";
|
||||
homepage = "https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-2103.html";
|
||||
};
|
||||
|
||||
"21.06.0" = {
|
||||
major = "21";
|
||||
minor = "6";
|
||||
patch = "0";
|
||||
x64hash = "f3f98c60b0aaac31eb44dc98f22ee7ae7df229c960d5d29785eb5e9554f85f68";
|
||||
x86hash = "c2d9652ad9488a9ff171e62df8455ebe6890bcfade1cc289893ee35322d9d812";
|
||||
x64suffix = "28";
|
||||
x86suffix = "28";
|
||||
homepage = "https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-2106.html";
|
||||
};
|
||||
|
||||
"21.08.0" = {
|
||||
major = "21";
|
||||
minor = "8";
|
||||
patch = "0";
|
||||
x64hash = "69ddae29cc8b4b68341c3d9503a54ee70ab58a5795fd83e79573f013eda5518c";
|
||||
x86hash = "b6d1bde5a8533f22374e1f5bbb3f5949e5b89773d0703e021fbe784b455aad3f";
|
||||
x64suffix = "40";
|
||||
x86suffix = "40";
|
||||
homepage = "https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-2108.html";
|
||||
};
|
||||
|
||||
"21.09.0" = {
|
||||
major = "21";
|
||||
minor = "9";
|
||||
patch = "0";
|
||||
x64hash = "d58d5cbbcb5ace95b75b1400061d475b8e72dbdf5f03abacea6d39686991f848";
|
||||
x86hash = "c646c52889e88aa0bb051070076763d5407f21fb6ad6dfcb0fe635ac01180c51";
|
||||
x64suffix = "25";
|
||||
x86suffix = "25";
|
||||
homepage = "https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-2109.html";
|
||||
};
|
||||
|
||||
"21.12.0" = {
|
||||
major = "21";
|
||||
minor = "12";
|
||||
patch = "0";
|
||||
x64hash = "de81deab648e1ebe0ddb12aa9591c8014d7fad4eba0db768f25eb156330bb34d";
|
||||
x86hash = "3746cdbe26727f7f6fb85fbe5f3e6df0322d79bb66e3a70158b22cb4f6b6b292";
|
||||
x64suffix = "18";
|
||||
x86suffix = "18";
|
||||
homepage = "https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-2112.html";
|
||||
};
|
||||
|
||||
"22.05.0" = {
|
||||
major = "22";
|
||||
minor = "5";
|
||||
patch = "0";
|
||||
x64hash = "49786fd3b5361b1f42b7bb0e36572a209e95acb1335737da5216345b6420f053";
|
||||
x86hash = "f2dc1fd64e5314b62ba87f384958c2bbd48b06b55bed10345cddb05fdc8cffa1";
|
||||
x64suffix = "16";
|
||||
x86suffix = "16";
|
||||
homepage = "https://www.citrix.com/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 = [ ];
|
||||
in {
|
||||
inherit supportedVersions unsupportedVersions;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue