!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

125 Members
24 Servers

Load older messages


SenderMessageTime
7 Dec 2024
@gggkiller:matrix.orgGGG * openssl too23:56:39
@6pak:matrix.org6pakoh right23:56:40
8 Dec 2024
@gggkiller:matrix.orgGGGideally the repo should be under the NixOS org, but I guess initially we'll have to leave it in one of our accounts before we get it fully working and widespread use00:09:20
@gggkiller:matrix.orgGGG it'd also be nice to have an equivalent of autoPatchelfHook 00:09:28
@gggkiller:matrix.orgGGG Corngood: any tips to speed up the SDK source build? or no option other than just wait? 00:37:22
@gggkiller:matrix.orgGGGit is pretty slow on my machine, takes a bit over an hour00:37:42
@corngood:corngood.comCorngood Unfortunately I don't think so. It's brutal, and it seems to go pretty wide for most of the build. I think it might be overkill to built your patchelf change with the source builds of both sdk 8 and 9. 00:40:13
@corngood:corngood.comCorngood * Unfortunately I don't think so. It's brutal, and it seems to go pretty wide for most of the build. I think it might be overkill to build your patchelf change with the source builds of both sdk 8 and 9. 00:40:30
@gggkiller:matrix.orgGGGI mean, the issue is that quite a few packages use the source-built version of the SDK, and the source builds themselves also use that patchelf00:40:48
@gggkiller:matrix.orgGGG * I mean, the issue is that quite a few packages use the source-built version of the SDK, and the source builds themselves also use that patchelf change00:40:50
@gggkiller:matrix.orgGGGso I need to be sure nothing broke00:40:57
@gggkiller:matrix.orgGGGif we had content-addressed derivations by default at least it'd detect nothing actually changed and skip the builds for the rest00:42:55
@gggkiller:matrix.orgGGGbut that's still a way's away unfortunately00:43:01
@gggkiller:matrix.orgGGG huh, the way alcom works is really weird 04:00:34
@gggkiller:matrix.orgGGG it uses dotnetBuildModule but then throws away everything from it except nugetDeps 04:00:48
@gggkiller:matrix.orgGGGhow does that even work04:00:51
9 Dec 2024
@lostmsu:matrix.orglostmsuWait, why would you write a tool if you could just modify the .NET itself03:01:14
@lostmsu:matrix.orglostmsuhttps://github.com/dotnet/runtime/blob/f8f713e3c6f10570cd8911f10bfb4e43bba4b072/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/NativeLibrary.cs#L2903:04:07
@corngood:corngood.comCorngoodI think just because we still use the binary runtime. Hopefully in the future we can just patch it 03:06:39
@6pak:matrix.org6pak
In reply to @lostmsu:matrix.org
Wait, why would you write a tool if you could just modify the .NET itself
the same reason you patch the elfs not the system linker
20:45:03
@lostmsu:matrix.orglostmsu
In reply to @6pak:matrix.org
the same reason you patch the elfs not the system linker
but dotnet is not a linker - it is a runtime platform
you don't patch .NET framework - targeted executables to run on Mono on Linux, you change Mono to use different platform calls when they run on Linux
23:51:53
10 Dec 2024
@6pak:matrix.org6pakI mean in nixpkgs you do patch the native executables/libraries to use full nix store paths for dependencies using patchelf15:40:14
@6pak:matrix.org6pakso you can do pure side by side installs etc15:40:21
@6pak:matrix.org6pak the other approach is making wrapper scripts that add the dependencies to LD_LIBRARY_PATH everywhere (which is what dotnet in nixpkgs does today) 15:41:04
@6pak:matrix.org6pakbut it's annoying and only works for executables15:41:37
@6pak:matrix.org6pak has anyone ever looked into making fetch-deps use GenerateRestoreGraphFile instead doing a full restore? 16:32:32
@6pak:matrix.org6pak * has anyone ever looked into making fetch-deps use GenerateRestoreGraphFile instead of doing a full restore? 16:32:39
@corngood:corngood.comCorngood
In reply to @6pak:matrix.org
has anyone ever looked into making fetch-deps use GenerateRestoreGraphFile instead of doing a full restore?

I haven't. There are a lot of nuances to finding the actual dependencies: dotnet tools, paket, etc.

It might still be useful if it can be used for a subset of packages, either opt-in or out.

16:50:30
11 Dec 2024
@lostmsu:matrix.orglostmsuOK, leaving aside the runtime behavior, can anyone think of a way to modify my C# project with native dependency to make it fail building under Nix if that dependency is not declared in Nix?23:15:44
12 Dec 2024
@gggkiller:matrix.orgGGG Simply not possible. Nix currently has no resources for determining which native libraries your project uses so it cannot make the build fail. Even if your project is being built from source using buildDotnetModule, .NET has no builtin facilities to block a build if said native libraries aren't found either. 00:00:52

Show newer messages


Back to Room ListRoom Version: 9