Nix + dotnet | 127 Members | |
| 24 Servers |
| Sender | Message | Time |
|---|---|---|
| 5 Dec 2024 | ||
| A question about Rider and FHS environments: Rider is sort of single instance app, e.g. all windows are actually run by a single instance of Rider. How do you deal with that and the need for FHS environments? Do I even need FHS environments? Could I make Rider somehow use nix tooling for building packages? | 19:36:26 | |
| All these questions arise from the .NET packages that depend on Linux DLLs | 19:40:23 | |
Corngood: quick question, how does nuget-to-nix determine what packages are SDK ones or not? | 22:01:10 | |
| It looks for packages that are installed in $NUGET_PACKAGES after restore. Packages from other build inputs are either not installed at all (they get referenced through $NUGET_FALLBACK_PACKAGES), or it skips them by:
To be clear this goes for all packages that come from other nix derivations, not just SDK ones (even though those are by far the most common right now). | 22:06:44 | |
| Hm, interesting | 22:07:16 | |
| I'm planning to make that thing you mentioned about referencing SDK packages | 22:07:25 | |
| and I'm gonna add them to the lockfile without a url (or a special URL) | 22:07:41 | |
| that way it removes the unused packages from the SDK since it doesn't need them | 22:07:53 | |
| although that's an issue since we don't have a dependency tree for the SDK packages | 22:08:16 | |
| might leave this for later after all | 22:08:21 | |
Yeah, I think that's a can of worms. Think about avalonia. It outputs a bunch of nuget packages, but only some of them may be used by a dependent package. Same problem really. | 22:09:36 | |
| I mean, we have individual packages in the SDK, but we don't have their inter-dependencies | 22:10:08 | |
| like for stuff like metapackages | 22:10:17 | |
honestly, long term it might be useful to have something akin to ldd to list what assemblies a given assembly depends upon | 22:10:59 | |
| that way we could build a dependency graph | 22:11:15 | |
The way the SDK references packages is pretty magical. For example, you may need Microsoft.AspNetCore.App.Ref when building non-aspnetcore stuff. | 22:12:44 | |
| I have a branch somewhere where I was trying to make the SDK packages opt-in. | 22:13:26 | |
| yeah, that's why I think we might need something like a dependency graph, to identify all that's being used | 22:13:59 | |
| I discussed the sdk packages quite a bit with 6pak as well | 22:14:00 | |
| or maybe not even a dependency graph, just a bit set of used packages that we recursively walk upon | 22:14:18 | |
| * or maybe not even a dependency graph, just a big set of used packages that we recursively walk upon | 22:14:29 | |
I also did some work on using the nuget client API to figure out dependencies so that we could make, for example avalonia write separate outputs for its individual package, hook up dependencies, and map nuget package ids back to derivations. I got stuck on that one because I found the dependency solver extremely painful to use. | 22:16:06 | |
yeah, i also tried to use the nuget client when I was trying to convert nuget-to-nix to C# and it was really painful to use | 22:16:49 | |
| https://github.com/NixOS/nixpkgs/compare/master...corngood:nixpkgs:dotnet-avalonia.wip Here's one branch full of hacks. I was trying to do something along the lines of python/haskell, where we pull in nuget packages centrally. We'd then be able to replace them individually with source-built derivations. | 22:21:54 | |
| I'm not a fan of introducing more generated stuff into nixpkgs, pythonPackages is all manual, nodePackages is getting dropped, lockfiles are being externalized as much as possible, etc. Is there a way to do this without introducing more generated code? | 22:25:23 | |
| No, it is not possible | 22:26:14 | |
| .NET's builtin lockfiles aren't widely used so we need to have in-tree generated ones | 22:26:39 | |
| I don't think we should be using binary packages from nuget.org at all, which means nixpkgs would have to know how to build everything from source. | 22:27:40 | |
| I think that's going too far given the size of our team | 22:27:56 | |
| Yeah, we'll it's not in danger of happening any time soon :) | 22:28:20 | |