| 10 Oct 2025 |
Whovian9369 | Download prerelease.nix | 21:08:49 |
Whovian9369 | Here's my current derivation that's throwing the error, in case it gives any obvious ideas. | 21:09:15 |
Whovian9369 | Just realized that one of the differing commits seems to specifically "fix" this error by telling Dotnet to ignore it: https://github.com/aaru-dps/Aaru/commit/3b2cda2e312420038a40bd9a53f9a8334c38ca1b | 21:29:53 |
Whovian9369 | Pinning the release to that makes the build work. so I'm going to stop questioning it for the moment. | 21:30:49 |
| 14 Oct 2025 |
Samuel | dotnet 10 rc2 is out now | 20:21:20 |
| 15 Oct 2025 |
Corngood | I'm running updates locally. Unfortunately they rearranged things in their release bot and broke auto updates :| | 01:14:55 |
| Andrew Zah changed their display name from andrewzah to Andrew Zah. | 09:29:43 |
Corngood | october updates in: https://github.com/NixOS/nixpkgs/pull/452225
nothing too concerning so far | 17:21:09 |
Samuel | awesome | 17:23:12 |
| 16 Oct 2025 |
Samuel | Building webkit is not fun | 09:52:24 |
Corngood | I'm happy with this now. Could use a review if anyone is available. | 14:02:40 |
Samuel | Building right now | 16:52:20 |
| 21 Oct 2025 |
| Andrew Zah set a profile picture. | 09:49:41 |
| 23 Oct 2025 |
| Manuel Bärenz joined the room. | 15:45:21 |
Manuel Bärenz | I'm using nixpkgs for years now, and dotnet for the first time. I need to package a web service somepkg that a third party offers on their own nuget server nuget.thirdparty.com/somepkg/nuget. I can't figure out how to properly override buildDotnetGlobalTool (I guess) to accept the custom nuget url. I'm trying something like this:
buildDotnetGlobalTool.override ({
fetchNupkg = dotnetCorePackages.fetchNupkg.override {
url = "..."
But that seems to be wrong:
error: function 'anonymous lambda' called with unexpected argument 'url'
at /nix/store/jbjpzwqzf0vq989s6y302jy1dff4z321-source/pkgs/build-support/dotnet/fetch-nupkg/default.nix:1:1:
Is there a standard way to do this? (Or else I probably need to dig deep into how dotnet is implemented in nixpkgs?)
| 15:49:10 |
Manuel Bärenz | I managed something like this:
let
pname = "IBPkernelSimplifiedHS";
version = "v1";
customNugetServer = "https://nuget.thirdparty.com/somepkg/nuget";
url = "${customNugetServer}/${pname}/${version}";
in
dotnetCorePackages.buildDotnetGlobalTool.override {
fetchNupkg = args: dotnetCorePackages.fetchNupkg (args // {
inherit url;
});
} {
inherit pname version;
}
And it actually attempts to download from the third party server 🎉 but the URL schema is still wrong. I'm not sure what the standard url schema would be in this case.
| 16:06:47 |
Manuel Bärenz | I managed to grasp the URL schema, so that's fixed. I now have have a somepkg.nupkg archive with this structure:
_rels -> .rels
_lib -> net8.0 ->
somepkg.dll
somepkgFoo.dll
...
package ->
services -> metadata -> core-properties -> 12341234.psmdcp
[Content_Types].xml
somepkg.nuspec
It seems that buildDotnetGlobalTool can't deal with this structure:
Unhandled exception: System.IO.DirectoryNotFoundException: Could not find a part of the path '/nix/store/58w6rl6al5f1yq4ckmg4qm7a8r1r7rz9-somepkg-1.0.98/lib/somepkg/.store/somepkg/1.0.98/somepkg/1.0.98/tools
| 16:32:50 |
Manuel Bärenz | * I managed to grasp the URL schema, so that's fixed. I now have have a somepkg.nupkg archive with this structure:
_rels -> .rels
lib -> net8.0 ->
somepkg.dll
somepkgFoo.dll
...
package ->
services -> metadata -> core-properties -> 12341234.psmdcp
[Content_Types].xml
somepkg.nuspec
It seems that buildDotnetGlobalTool can't deal with this structure:
Unhandled exception: System.IO.DirectoryNotFoundException: Could not find a part of the path '/nix/store/58w6rl6al5f1yq4ckmg4qm7a8r1r7rz9-somepkg-1.0.98/lib/somepkg/.store/somepkg/1.0.98/somepkg/1.0.98/tools
| 16:33:11 |
GGG | it seems like it isn't a dotnet tool, but just a plain .NET assembly instead | 17:32:28 |
GGG | you'll probably need to extract everything in lib, fetch its deps (if it has any) and then use makeWrapper to wrap it in a dotnet exec somepk.dll call | 17:33:03 |
GGG | * you'll probably need to extract everything in lib/net8.0, fetch its deps (if it has any) and then use makeWrapper to wrap it in a dotnet exec somepk.dll call | 17:41:55 |
Manuel Bärenz | Thanks, I'll try that! | 17:48:48 |
| 24 Oct 2025 |
Manuel Bärenz | I can't quite figure out how to pass dependencies properly to the dll. Right now I have this:
...
nupkg = dotnetCorePackages.fetchNupkg {
inherit url version pname;
sha256 = "sha256-Cq2t0TkGtmGpMcFrz9m0FJ14F4knfDoGaUFda9dijik=";
};
in
stdenvNoCC.mkDerivation {
inherit version pname;
nativeBuildInputs = [
makeWrapper
# dotnetCorePackages.runtime_8_0
dotnetCorePackages.sdk_8_0
];
buildInputs = [
dotnetCorePackages.runtime_8_0
# dotnetCorePackages.sdk_8_0
];
src = nupkg;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
makeWrapper ${lib.getExe dotnetCorePackages.runtime_8_0-bin} $out/bin/${pname} \
--add-flags "exec ${nupkg}/share/nuget/packages/${lib.toLower pname}/${version}/lib/net8.0/${pname}.dll"
runHook postInstall
'';
But it says:
A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in '/nix/store/yjszifiind26c7vpvyg4c3m49lgksv0z-somepkg-1.0.98/share/nuget/packages/somepkg/1.0.98/lib/net8.0/'
| 09:02:33 |
Manuel Bärenz | I tried to shuffle sdk and runtime around, sometimes getting this error:
> Running phase: configureNuget
> The command could not be loaded, possibly because:
> * You intended to execute a .NET application:
> The application 'new' does not exist.
> * You intended to execute a .NET SDK command:
> No .NET SDKs were found.
But I'm assuming that's because nuget is getting confused depending on what's on the path
| 09:03:38 |
Manuel Bärenz | Maybe I shouldn't use fetchNupkg at all, and just use fetchUrl? | 09:04:08 |
Manuel Bärenz | Anyways I would have assumed that libhostpolicy.so is in either the standard runtime or sdk, but I'm not passing dependencies in the right way | 09:06:09 |
Corngood | Are you able to share the whole thing somewhere? | 11:58:16 |
Manuel Bärenz | Unfortunately not, it's closed source :/ I'll try and work out a completely parametrized thing and share that | 12:55:08 |
Corngood | I think the problem is that makeWrapper is moving the dotnet executable? | 13:17:10 |
Corngood | can you share the contents of the wrapper script? | 13:17:41 |