Can't install u-he VST plugin

I’ve tried to install an u-he VST plugin using their install.sh script. Firstly, I modified its first line from #!/bin/bash -e to #/bin/sh -e because it wouldn’t run otherwise. But when I ran it, I got the following output:

./install.sh: line 86: Zebra2/dialog: cannot execute: required file not found
Please install missing libraries:
        not a dynamic executable

Here are the lines 86-90:

if ! "$DIALOG" true; then
    echo Please install missing libraries:
    ldd "$DIALOG"
    exit 1
fi

Do you know how this could be solved?
Thanks

Since NixOS has very strict dependency management it’s almost impossible to run any kind of install.sh from the internet on NixOS.
You’ll need to create a NixOS derivation. A “tutorial” can be found on the wiki, but it’s not completely trivial.

Thanks for the response!

I followed the mentioned tutorial and some articles, and this is what I ended up with (but it unfortunately doesn’t work):

{ pkgs ? import <nixpkgs> { system = builtins.currentSystem; }
, stdenv ? pkgs.stdenv
, lib ? pkgs.lib
, fetchurl ? pkgs.fetchurl
, autoPatchelfHook ? pkgs.autoPatchelfHook
}:

stdenv.mkDerivation rec {
  pname = "diva";
  version = "146_15017";

  src = fetchurl {
    url = "https://dl.u-he.com/releases/Diva_${version}_Linux.tar.xz"
;
    sha256 = "0hwz091ym6445jd6n3gz638hwbvjzi3fjdgrl71a17c2v7jnnx38";
  };

  nativeBuildInputs = [
    autoPatchelfHook
  ];

  buildInputs = [ ];

  installPhase = ''
    runHook preInstall
    mkdir -p $out/bin
    sh ./install.sh
    runHook postInstall
  '';

  meta = with lib; {
    homepage = "https://u-he.com/products/diva/";
    description = "Diva: Dinosaur Impersonating Virtual Analogue synthesizer. ";
    platforms = platforms.linux;
  };
}

It downloads the archive successfully, but then it fails and its output contains this message:

installing
./install.sh: line 83: Diva/dialog: cannot execute: required file not found
Please install missing libraries:
$       not a dynamic executable

I thought that autoPatchelfHook would resolve it automatically but it seems like it doesn’t.

Any idea what the problem might be?
Thanks