Nix + dotnet | 125 Members | |
| 24 Servers |
| Sender | Message | Time |
|---|---|---|
| 5 Dec 2024 | ||
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 | |
| But I think that's what makes nixpkgs great. It's just recipes to build lots and lots of software. | 22:29:27 | |
| Practical example: I wanted to patch a bug in csharp-language-server-protocol as used by omnisharp-roslyn. I had to add a new package for csharp-lanaguage-server-protocol, like this: https://github.com/corngood/nixpkgs/commit/4500ed36a9476510ab10af8c5744a48b40061d11 I usually don't run into problems like that with other languages, because they aren't pulling in things from binary blobs all over the place. | 22:39:44 | |
man, I wish there was an easy way to list all packages that use buildDotnetModule in nixpkgs | 22:39:43 | |
| this treewide migration to JSON is going to be a pain | 22:39:49 | |
| take a look at: maintainers/scripts/update-dotnet-lockfiles.nix It abuses update.nix to find packages that have | 22:41:22 | |
| yeah, I found that one | 22:41:35 | |
considering modifying it to add a rm deps.nix to the start of the script or something | 22:41:44 | |
or just outright modify fetch-deps to do that and then revert it after I finish running it | 22:41:58 | |
In reply to@gggkiller:matrix.org rg buildDotnetModule | 22:43:31 | |
| Sort of a tangent, but I've taken to running
| 22:44:23 | |
| what's the issue that you're worried about by not running it normally? /genq | 22:45:09 | |
| that's a good idea | 22:45:10 | |
even more so since fetch-deps runs the packages' code, it might have untrusted code running | 22:45:32 | |
| it shouldn't but who knows | 22:45:38 | |
In reply to @corngood:corngood.comThatd be nice if all nuget packages actually had linked sources | 22:46:47 | |
|
Yeah, if I'm regenerating all lockfiles, or doing mass updates, that's a lot of peoples code being run. Lots of new packages going in without any real audits. Could end up bad either through malice or accident. | 22:47:13 | |
| well, packages from nuget can run arbitrary code on installs, projects can also run arbitrary code on the restore stage and more | 22:47:27 | |
| technically contributors should've audited it before adding all of that to nixpkgs, but you can never be too safe | 22:47:43 | |
| Hey guys, I'm trying to see if there's a way to improve experience with C# code that has any kind of native dependencies (hi Avalonia). Would love you to chime in before I jumped to experimentation: https://github.com/NixOS-NET/Nix.NET/issues/1 | 22:49:01 | |
In reply to @gggkiller:matrix.orgConcern is upstream adding fishy stuff and maintaineds just merging the auto prs | 22:49:03 | |
| Yeah, that part of the dotnet ecosystem is a mess. Actual build recipes would be the dream. My favourite recent example was finding Avalonia.BuildServices, which is on nuget.org, but they don't even release the source for it. :| https://github.com/AvaloniaUI/Avalonia/discussions/16878 | 22:50:18 | |
| that's annoying >.> | 22:51:28 | |