NixOS - Packaging Vision Client and Perspective Workstation

Hey,

I'm trying to package the Vision Client / Perspective Workstation for NixOS in order to build reproducible kiosks.

I've got the Vision Client working with the following package config. It's just been a bunch of trial and error to discover the targetPkgs required to run, but I've got both the launcher and the client working:

# vision-client.nix
{
  pkgs,
  stdenv,
  buildFHSEnv,
}:
let

  pname = "vision-client";
  version = "8.1.43";

  src = pkgs.fetchzip {
    name = "vision-client";
    url = "https://files.inductiveautomation.com/release/ia/8.1.43/20240820-1049/visionclientlauncher.tar.gz";
    curlOpts = "--referer https://inductiveautomation.com/downloads/ignition";
    sha256 = "sha256-UdzpFCPAGtzh/6PdHg520ioOVtFWSv+OnDJmInWwbts=";   
  };

in buildFHSEnv {

  inherit pname version;
  runScript = "${src}/app/visionclientlauncher.sh";

  targetPkgs = pkgs: with pkgs; [
    fontconfig
    glib
    gtk3
    zlib
    xorg.libX11
    xorg.libXcursor
    xorg.libXext
    xorg.libXi
    xorg.libXtst
    xorg.libXrender
  ];
}

Now I'm trying to do the same for Perspective Workstation but I've hit a dead end. The launcher loads, but when launching a client I get the following error and I don't know what else to try. I figure it's probably another missing dependency, but the log is not very helpful:

20240908_200830

ERROR [BrowserUtils                  ] [2024/09/08 23:55:32]: Failed to start Browser Engine with options
 com.teamdev.jxbrowser.engine.EngineOptions:
  autoplayEnabled: true
  chromiumDir: /home/kiosk/.ignition/cache/resources/jxbrowser/7.12.1
  chromiumSwitches: []
  diskCacheSize: <unknown>
  fileAccessFromFilesAllowed: false
  isGpuDisabled: false
  isIncognitoEnabled:false
  language:en-us
  passwordStore: <unknown>
  remoteDebugginPort: 9224
  renderingMode: HARDWARE_ACCELERATED
  isSandboxDisabled: false
  secureOriginWhitelist: []
  isTouchMenuEnabled: true
  userAgent: <unknown user agent value>
  userDataDir:/home/kiosk/.ignition/clientlauncher-data/workstationUserData/2
  webSecurityDisabled: false
.
com.teamdev.jxbrowser.engine.ChromiumProcessStartupFailureException: Process exit code: 127
        at com.teamdev.jxbrowser.engine.internal.EngineImpl.throwExceptionAndCleanup(EngineImpl.java:478)
        at com.teamdev.jxbrowser.engine.internal.EngineImpl.newInstance(EngineImpl.java:281)
        at com.teamdev.jxbrowser.engine.Engine.newInstance(Engine.java:106)
        at com.inductiveautomation.ignition.launcher.workstation.utils.BrowserUtils.lambda$getOrCreateEngine$34(BrowserUtils.java:575)
        at com.inductiveautomation.ignition.launcher.workstation.utils.BrowserUtils.runResourceLockedAction(BrowserUtils.java:996)
        at com.inductiveautomation.ignition.launcher.workstation.utils.BrowserUtils.getOrCreateEngine(BrowserUtils.java:575)
        at com.inductiveautomation.ignition.launcher.workstation.utils.BrowserUtils.getOrCreateEngine(BrowserUtils.java:614)
        at com.inductiveautomation.ignition.launcher.workstation.utils.BrowserUtils.lambda$openAsyncImpl$13(BrowserUtils.java:306)
        at com.inductiveautomation.ignition.launcher.common.service.SimpleService$1.call(SimpleService.java:23)
        at javafx.concurrent.Task$TaskCallable.call(Task.java:1426)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at javafx.concurrent.Service.lambda$executeTask$6(Service.java:728)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at javafx.concurrent.Service.lambda$executeTask$7(Service.java:727)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

Here's the current Perspective Workstation config:

# perspective-workstation.nix
{
  pkgs,
  stdenv,
  buildFHSEnv,
  writeScript,
}:
let

  pname = "perspective-workstation";
  version = "8.1.43";

  src = pkgs.fetchzip {
    name = "perspective-workstation";
    url = "https://files.inductiveautomation.com/release/ia/8.1.43/20240820-1049/perspectiveworkstation.tar.gz";
    curlOpts = "--referer https://inductiveautomation.com/downloads/ignition";
    sha256 = "sha256-4N2P+rUopcZliRjIWDJhi6GdtcKN1qrayqj2Ur89ikU=";   
  };

in buildFHSEnv {

  inherit pname version;
  runScript = "${src}/app/perspectiveworkstation.sh";

  targetPkgs = pkgs: with pkgs; [
    fontconfig
    glib
    gtk3
    zlib
    xorg.libxcb
    xorg.libX11
    xorg.libXcursor
    xorg.libXext
    xorg.libXi
    xorg.libXtst
    xorg.libXrender
  ];
}

Any suggestions?

Chromium in kiosk mode is easy, but it'd be fun to say I have both first-party launchers working.