Omnisharp, libhostfxr.so not found

I have this topic, which got solved:

https://discourse.nixos.org/t/dotnet-script-libhostfxr-so-not-found/22346/11

, but I face the same issue if I run omnisharp:

omnisharp
A fatal error occurred. The required library libhostfxr.so could not be found.
If this is a self-contained application, that library should exist in [/nix/store/y0y6vlc2vz9l60ipivx2sz9c8h5j9wy1-omnisharp-roslyn-1.38.2/src/].
If this is a framework-dependent application, install the runtime in the global location [/usr/share/dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [/etc/dotnet].

The .NET runtime can be found at:
  - https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=nixos.22.05-x64&apphost_version=6.0.5
env|grep -i dotnet_root
DOTNET_ROOT=/nix/store/3axaxgbragp3zhb20i2swfqdwdnl1b3v-dotnet-sdk-6.0.300/

ok, solved it.

There’s a bug in “stable”.

, so I grabbed omnisharp from unstable:

  unstable = import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz) {};

  environment.systemPackages = with pkgs; [
    unstable.omnisharp-roslyn
  ];

ok, turns out, that link was wrong, cause I actually got an older version, which worked, but I need the newest one

the url is actually:

  unstable = import (fetchTarball https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz) {};

so, this one is the newest in unstable, but it has this libhostfxr.so problem;)

So, any pointers from here?

ok, I forgot to declare unstable.omnisharp here. Sorry. Working;)