Skip to content

dotnet: using nuget packages with native binaries in them #181373

@mdarocha

Description

@mdarocha

Issue description

Some NuGet packages include native binaries inside of them for various purposes - ie. see Grpc.Tools.

Using them in NixOS is currently impossible, since these binaries are compiled for a normal FHS linux system, and fail on NixOS.

Two additional features are needed for usage of such binaries to improve in NixOS:

  1. Support in buildDotnetModule

    buildDotnetModule should automatically run patchelf on all found binaries in
    the restored nuget dependencies. This would allow easy support in nixpkgs

  2. Support when running bare dotnet command

    This one is a lot more trickier. When running native dotnet command (outside the
    scope of a Nix build), patchelf should automatically patch restored nuget packages.

    This is a lower priority feature, mainly aimed at developer egonomics. It would
    be also a lot harder to implement. Ideas welcome.

Steps to reproduce

Try to create and build any .NET project that uses nuget packages with native binaries
(ie. eventstore)

Technical details

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

Metadata

Metadata

Assignees

Labels

0.kind: enhancementAdd something new or improve an existing system.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions