nixpkgs/pkgs/applications/networking/remote/citrix-workspace/sources.nix
Artturin e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00

71 lines
2.7 KiB
Nix

{ stdenv, lib }:
let
mkVersionInfo = _: { major, minor, patch, x64hash, x86hash, x64suffix, x86suffix, homepage }:
{ inherit homepage;
version = "${major}.${minor}.${patch}.${if stdenv.hostPlatform.is64bit then x64suffix else x86suffix}";
prefix = "linuxx${if stdenv.hostPlatform.is64bit then "64" else "86"}";
hash = if stdenv.hostPlatform.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/
# x86 is unsupported past 23.11, see https://docs.citrix.com/en-us/citrix-workspace-app-for-linux/deprecation
supportedVersions = lib.mapAttrs mkVersionInfo {
"23.09.0" = {
major = "23";
minor = "9";
patch = "0";
x64hash = "7b06339654aa27258d6dfa922828b43256e780b282d07109f452246c7aa27514";
x86hash = "95436fb289602cf31c65b7df89da145fc170233cb2e758a2f11116f15b57d382";
x64suffix = "24";
x86suffix = "24";
homepage = "https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-latest9.html";
};
"23.11.0" = {
major = "23";
minor = "11";
patch = "0";
x64hash = "d3dde64baa6db7675a025eff546d552544d3523f4f3047621884f7830a9e2822";
x86hash = "65b8c144e51b5bd78b98ae69e0fa76d6c020a857d74fd5254be49492527072b6";
x64suffix = "82";
x86suffix = "82";
homepage = "https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-latest10.html";
};
"24.02.0" = {
major = "24";
minor = "2";
patch = "0";
x64hash = "eaeb5d3bd079d4e5c9707da67f5f7a25cb765e19c36d01861290655dbf2aaee4";
x86hash = "";
x64suffix = "65";
x86suffix = "";
homepage = "https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-latest12.html";
};
"24.05.0" = {
major = "24";
minor = "5";
patch = "0";
x64hash = "sha256-pye2JOilSbp8PFCpVXFkrRW98E8klCqoisVSWjR38nE=";
x86hash = "";
x64suffix = "76";
x86suffix = "";
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/workspace-app.html
unsupportedVersions = [ "23.02.0" "23.07.0" ];
in {
inherit supportedVersions unsupportedVersions;
}