When I run dotnet-script, I get this error:
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 [/home/b0ef/.dotnet/tools/.store/dotnet-script/1.3.1/dotnet-script/1.3.1/tools/net6.0/any/].
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:
This seems to be a known issue and listed here as resolved:
It says it’s merged into master on April 26th, so this should’ve been included in the channel I’m running, no?
b0ef $ ~ >
sudo nix-channel --list
[sudo] password for b0ef:
No that change is not on stable.
ok, so master is basically head, but can I pull in that change without going to unstable?
Fork the repo, checkout stable, cherry-pick the commit, change your input to that, profit.
ok, this is far out, as I’ve started using nix like two weeks ago;) Anyways, I should focus on a flake?, like this: How do I apply a GitHub commit to my configuration.nix? - #3 by nrdxp
Oh, overread that you where still using channels. You can do that same thing with channels by adding a GitHub archive download link as as a new channel URL.
I wonder first if this commit is part of unstable, at this point? How can I check that?
It is in unstable when it was pushed by hydra to GitHub - NixOS/nixpkgs at nixos-unstable
Seems I’m wrong here, as that issue I linked to on Github is not the same issue I’m facing, so I’m back to square one.
b0ef $ ~ >
find /nix/store/3axaxgbragp3zhb20i2swfqdwdnl1b3v-dotnet-sdk-6.0.300/ -iname "*fxr*"
ok, it works if I do this:
, but shouldn’t this be set by the installation of dotnet?
I installed dotnet-script non declarative, though:
dotnet tool install -g dotnet-script
Maybe it should’ve been installed declaratively? If so, how?
Checkout my dotfiles. You need dotnet.nix and dotnet-tool.nix from it. I packed dotnet-script for you, so you just need to add
dotnet-script in the list of tools in dotnet.nix.
Note that my declarative global tool installation is super-experimental.