Nix-ld with Softmaker Office 2024

I’m trying to install dynamically linked apps e. g. Softmaker Office 2024.
I followed https://github.com/Mic92/nix-ld and added

programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
  # Add any missing dynamic libraries for unpackaged 
  # programs here, NOT in environment.systemPackages
 
	libX11
	libXmu
	libXext
        ....
];

I got the list from:

 ldd ./presentations
	linux-vdso.so.1 (0x00007ffea43f7000)
	libdl.so.2 => /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libdl.so.2 (0x00007f8c0ddea000)
	libX11.so.6 => not found
	libXmu.so.6 => not found
	libXext.so.6 => not found
	libm.so.6 => /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libm.so.6 (0x00007f8c0dd07000)
	libXrender.so.1 => not found
	libXrandr.so.2 => not found
	libcurl.so.4 => not found
	libstdc++.so.6 => not found
	libpthread.so.0 => /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libpthread.so.0 (0x00007f8c0dd00000)
	libGL.so.1 => not found
	libgobject-2.0.so.0 => not found
	libgstreamer-1.0.so.0 => not found
	libgstaudio-1.0.so.0 => not found
	libgstvideo-1.0.so.0 => not found
	libgstapp-1.0.so.0 => not found
	libgcc_s.so.1 => /nix/store/1q9vc0lq7qjlfjz47mfmlzdf86c543jy-xgcc-13.2.0-libgcc/lib/libgcc_s.so.1 (0x00007f8c0dcd7000)
	libc.so.6 => /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libc.so.6 (0x00007f8c0daea000)
	/lib64/ld-linux-x86-64.so.2 => /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib64/ld-linux-x86-64.so.2 (0x00007f8c0ddf1000)

The switch fails though: error: undefined variable ‘libX11’

What am I doing wrong?

pkgs.xorg.libX11

Thanks but I still get an error.

./presentations: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory

What is you code example?

have you used
libPath = stdenv.lib.makeLibraryPath [

My configuration.nix is the one above.
I now tried your code similar to the masterpdf example:

#shell.nix
with import <nixpkgs> {};
mkShell {
  NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [

    alsa-lib
    at-spi2-atk
    at-spi2-core
    atk
    cairo
    cups
    curl
    dbus
    expat
    fontconfig
    freetype
    fuse3
    gdk-pixbuf
    glib
    gtk3
    icu
    libGL
    libappindicator-gtk3
    libdrm
    libglvnd
    libnotify
    libpulseaudio
    libunwind
    libusb1
    libuuid
    libxkbcommon
    libxml2
    mesa
    nspr
    nss
    openssl
    pango
    pipewire
    stdenv.cc.cc
    systemd
    vulkan-loader
    pkgs.xorg.libX11
    xorg.libX11
    xorg.libXScrnSaver
    xorg.libXcomposite
    xorg.libXcursor
    xorg.libXdamage
    xorg.libXext
    xorg.libXfixes
    xorg.libXi
    xorg.libXrandr
    xorg.libXrender
    xorg.libXtst
    xorg.libxcb
    xorg.libxkbfile
    xorg.libxshmfence
    zlib
  ];
  NIX_LD = lib.fileContents "${stdenv.cc}/nix-support/dynamic-linker";
}

executed with

[nix-shell:~/office2024]$ nix-shell ./shell.nix 

[nix-shell:~/office2024]$ ./presentations 
./presentations: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory