[DotNet] Help packaging Kurrent (EventStore successor) – error with browser-wasm RuntimeIdentifier

Hi,

I’m trying to package Kurrent (formerly EventStoreDB) for NixOS. There is already an existing package for EventStore here, and I modified it for Kurrent.

However, I’m running into a build issue with the new version. During the build, I get the following error:

Build FAILED.

/build/nuget.QGZKec/packages/gitinfo/3.3.3/build/GitInfo.targets(433,5): warning GI002: Could not retrieve repository url for remote 'origin' [/build/source/src/EventStore.Common/EventStore.Common.csproj]
/nix/store/54gypa80kzw14zawp2x963cd9gddbvs0-dotnet-sdk-8.0.406/share/dotnet/sdk/8.0.406/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(154,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'browser-wasm'. [/build/source/src/KurrentDB.UI/KurrentDB.UI.csproj]
/nix/store/54gypa80kzw14zawp2x963cd9gddbvs0-dotnet-sdk-8.0.406/share/dotnet/sdk/8.0.406/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(154,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'browser-wasm'. [/build/source/src/KurrentDB.UI/KurrentDB.UI.csproj]
/nix/store/54gypa80kzw14zawp2x963cd9gddbvs0-dotnet-sdk-8.0.406/share/dotnet/sdk/8.0.406/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(154,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'browser-wasm'. [/build/source/src/KurrentDB.UI/KurrentDB.UI.csproj]
/nix/store/54gypa80kzw14zawp2x963cd9gddbvs0-dotnet-sdk-8.0.406/share/dotnet/sdk/8.0.406/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(154,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'browser-wasm'. [/build/source/src/KurrentDB.UI/KurrentDB.UI.csproj]
    1 Warning(s)
    4 Error(s)

It seems related to the KurrentDB.UI project which uses Blazor/WebAssembly. I’m not sure how to properly handle this within Nixpkgs.

Here is my default.nix:

# https://github.com/NixOS/nixpkgs/blob/b7f5ba43a2deb4a72aaf63987dec61af37ba5859/pkgs/servers/nosql/eventstore/default.nix
{
  bintools,
  buildDotnetModule,
  dotnetCorePackages,
  fetchFromGitHub,
  git,
  glibcLocales,
  lib,
  mono,
  stdenv,
}: let
  mainProgram = "KurrentDB";
in
  buildDotnetModule rec {
    pname = "Kurrent";
    version = "25.0.1";

    src = fetchFromGitHub {
      owner = "kurrent-io";
      repo = "KurrentDB";
      rev = "v${version}";
      hash = "sha256-c1G1glNOLqDJvdDPWkPURoLilIPrDKU64c5wOMLi7OY=";
      leaveDotGit = true;
    };

    # Fixes application reporting 0.0.0.0 as its version.
    MINVERVERSIONOVERRIDE = version;

    dotnet-sdk = dotnetCorePackages.sdk_8_0-bin;
    dotnet-runtime = dotnetCorePackages.aspnetcore_8_0-bin;

    nativeBuildInputs = [
      git
      glibcLocales
      bintools
    ];

    runtimeDeps = [mono];

    executables = [mainProgram];

    nugetDeps = ./deps.json;

    projectFile = "src/KurrentDB/KurrentDB.csproj";

    meta = with lib; {
      homepage = "https://www.kurrentdb.io";
      description = "Event sourcing database";
      license = licenses.bsd3;
      maintainers = with maintainers; [
        puffnfresh
        mdarocha
      ];
      platforms = [
        "x86_64-linux"
      ];
      inherit mainProgram;
    };
  }

and here my deps.json file: https://pastebin.com/raw/gHxZYc5Z

Any advice or pointers on how to approach packaging this would be greatly appreciated!