I can’t find how to put dependencies inside this package What is the procedure to do so ? I see that there is a fetchnuget helper, but I cannot figure out how to use it.
Hello @jonringer, thanks for your answer. I’m currently deploying a production environement where I have to dpeloy dotnet apps, I can leverage Docker as a temporary workaround.
I also have some time that I can use to help on this (since I’m being confined right now) : what would be the correct approach ? How would you see the dotnet packaging working ?
I recently played with a Ruby app with the bundlerApp helper (with bundix) and it was a really smooth experience to deploy an app that works in production.
Maybe we could have a dotnetApp helper that could do the same with a definition of the dependencies (that could maybe in the future be generated with a tool that is bundix-like) ?
adding a shellHook for adding the needed dependencies for published dotnet projects. Also, a nice have would be export the dotnet-runtime, instead dotnet-sdk to reduce closure size. And for nuget dependencies, some way to vendor them so they can be fixed output derivations, and not cause an error during dotnet restore or dotnet build
I’ve been trying to create an helper to download NuGet dependencies to package dotnet applications properly. I have the feeling it can be made using only Nix, but I struggle to do it. I use the dotnet option to generate a Lockfile.
Unfortunately, I have a hash mismatch error with this solution, and I could not figure out why.
I have the feeling that the way that the hash is calculated is different, but I could find a specification on how this hash is calculated.
if the lock file includes some metadata which can be extrapolated to a stable url, and there’s some type of checksum, then we can use the lock file directly from src. If not, then we need something like a dotnet2nix which can generate a file which has those things.
All you have to do for nuget deps is run nuget-to-nix on the projects source, which will generate a custom dependency lockfile. In the future I would like to automate the dependeny fetching, but for now this works
Official lockfiles are not yet supported, but I do plan to make them work.