!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

127 Members
24 Servers

Load older messages


SenderMessageTime
5 Dec 2024
@corngood:corngood.comCorngood

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
@pyrox:pyrox.devdish [Fox/It/She]that's annoying >.>22:51:28
@pyrox:pyrox.devdish [Fox/It/She]also I'm just thinking about the versions situation in dotnet, it's a lot more varied than the python package ecosystem(from my POV as someone who uses python more) where there are a lot of versions of different packages in use at different times, so it may be harder to package each one individually22:52:26
@gggkiller:matrix.orgGGGyeah, that's also another issue22:52:50
@gggkiller:matrix.orgGGGI guess we're more similar to the node ecosystem in that aspect22:53:00
@pyrox:pyrox.devdish [Fox/It/She]i'd be interested in maybe being able to use nix-init or a similar tool to generate initial expressions, but I don't want a single big inscrutible lockfile because that's just unmaintainable22:53:04
@pyrox:pyrox.devdish [Fox/It/She]* i'd be interested in maybe being able to use nix-init or a similar tool to generate initial expressions for from-source packages, but I don't want a single big inscrutible lockfile because that's just unmaintainable22:53:14
@corngood:corngood.comCorngood

I don't know how relevant this is, but the thing that comes to mind is how we patch the dll imports in the source-built version of avalonia:

          substituteInPlace src/Avalonia.X11/ICELib.cs \
            --replace-fail '"libICE.so.6"' '"${lib.getLib libICE}/lib/libICE.so.6"'
          substituteInPlace src/Avalonia.X11/SMLib.cs \
            --replace-fail '"libSM.so.6"' '"${lib.getLib libSM}/lib/libSM.so.6"'
          substituteInPlace src/Avalonia.X11/XLib.cs \
            --replace-fail '"libX11.so.6"' '"${lib.getLib libX11}/lib/libX11.so.6"' \
            --replace-fail '"libXrandr.so.2"' '"${lib.getLib libXrandr}/lib/libXrandr.so.2"' \
            --replace-fail '"libXext.so.6"' '"${lib.getLib libXext}/lib/libXext.so.6"' \
            --replace-fail '"libXi.so.6"' '"${lib.getLib libXi}/lib/libXi.so.6"' \
            --replace-fail '"libXcursor.so.1"' '"${lib.getLib libXcursor}/lib/libXcursor.so.1"'
22:53:24
@pyrox:pyrox.devdish [Fox/It/She](see the node-packages.nix file, and the whole reason why I'm working on reducing that)22:53:33
@emma:rory.gayEmma [it/its]Oh wtf, i wasnt even aware of avalonia having telemetry, ew22:53:36
@emma:rory.gayEmma [it/its]I should check tomorrow whether i still have the code for my recursive dotnet workload to nix generator22:55:42
@corngood:corngood.comCorngood

we nerf it in the source-build of avalonia:

      preConfigure = ''
        # closed source (telemetry?) https://github.com/AvaloniaUI/Avalonia/discussions/16878
        dotnet remove packages/Avalonia/Avalonia.csproj package Avalonia.BuildServices
      '';

but that needs work before other packages can use it.

it should just be build-time, in sandbox, but it's still shady

22:55:48
@gggkiller:matrix.orgGGG

I think it's a nice idea on paper but has a lot of issues in practice.

Let's say libc for example (ofc nothing in .NET uses it but anyways), there are like 2 or 5 packages that provide that and maybe not all of them could work.

Or maybe openssl, that has 1.1.x and 3.0 versions, which one does the package want if they only specifcy openssl.so?

I don't think we'll be able to get rid of this anytime soon, just like Rust can't nor any other native lang really

22:55:50
@gggkiller:matrix.orgGGG even in Rust when you're using native libraries you need to set up a LD_PRELOAD_PATH env var to actually get it to work 22:56:13
@gggkiller:matrix.orgGGGI don't think nix and dev shells will ever not be a thing22:56:26
@gggkiller:matrix.orgGGG do you run this with sudo? for me it fails with Error mkdir: util.c:1036 create_empty_dir_as_root: Permission denied 22:58:36
@gggkiller:matrix.orgGGGnevermind, 1 google search solved it, I'm dumb23:01:01
@corngood:corngood.comCorngood was it just the missing suid thing from not using programs.firejail.enable = true;? 23:12:15
@gggkiller:matrix.orgGGGyeah23:12:23
@gggkiller:matrix.orgGGG btw, shouldn't we be catching Microsoft.AspNetCore.App.Runtime.{rid}, Microsoft.NETCore.App.Host.{rid}, Microsoft.NETCore.App.Runtime.{rid} and runtime.{rid}.Microsoft.DotNet.ILCompiler as SDK packages?
it doesn't seem to be happening with alcom
23:41:01
@corngood:corngood.comCorngood it looks like it's targeting 8.0.1 explicitly or something? 23:59:26
6 Dec 2024
@corngood:corngood.comCorngoodweird https://github.com/vrc-get/vrc-get/blob/af1eee8c46e2bf7f0427a2dc5bac7b1bc99e039b/vrc-get-litedb/dotnet/vrc-get-litedb.csproj#L600:00:21
@gggkiller:matrix.orgGGGdoesn't seem to be the case00:01:47
@gggkiller:matrix.orgGGGoh nvm00:02:07
@gggkiller:matrix.orgGGG $(RuntimeFrameworkVersion) and <RuntimeFrameworkVersion>8.0.1</RuntimeFrameworkVersion> 00:02:14
@corngood:corngood.comCorngood

needs something like:

    dotnetFlags = [ "-p:RuntimeFrameworkVersion={dotnetCorePackags.runtime_8_0}" ];
00:02:43
@gggkiller:matrix.orgGGGprobably00:02:49
@gggkiller:matrix.orgGGGI also kinda regret using the maintainer upgrade script00:03:26
@corngood:corngood.comCorngood *

needs something like:

    dotnetFlags = [ "-p:RuntimeFrameworkVersion=${dotnetRuntime.version}" ];
00:03:33
@gggkiller:matrix.orgGGG should've made a quick bash script that runs nix eval --impure --json --expr 'import ./pkgs/by-name/ro/roslyn/deps.nix {fetchNuGet = id: id;}' | jq . > deps.json 00:03:34

Show newer messages


Back to Room ListRoom Version: 9