!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

123 Members
23 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
6 May 2025
@corngood:corngood.comCorngoodstill, they were only concerned about their codebase and dependencies13:52:28
@corngood:corngood.comCorngoodwe don't need to differentiate already-patched or source-built binaries, do we?13:53:39
@gggkiller:matrix.orgGGGno, this was only so I could make a hook to do the patching we do for pre-built .NET apps13:54:13
@gggkiller:matrix.orgGGGthat adds the whole ICU, Kerberos, OpenSSL and etc. deps13:54:25
@corngood:corngood.comCorngoodBut I mean we're not mixing other stuff in the same outputs that are being patched?13:56:10
@gggkiller:matrix.orgGGGeven if we do, there shouldn't be any harm I think13:56:36
@corngood:corngood.comCorngoodI'm just thinking about if we make a general hook for doing this. We might want to warn against using it on already patched things. Like you said it probably wouldn't break anything. Patched runtime would still explicitly load libs from /nix/store.13:57:17
@gggkiller:matrix.orgGGGyeah, looking at the actual effects of it, it'd only add a few unnecessary RPATH and needed entries13:57:53
@gggkiller:matrix.orgGGGbut it wouldn't result in anything more in the nix store nor unnecessary packages being pulled in13:58:07
@gggkiller:matrix.orgGGGif it's a framework-dependent apphost, then the runtime in the nix store should already work, so perhaps we only need to identify self-contained apphosts?13:58:58
@corngood:corngood.comCorngood Other than apphost and singlefilehost, is there anything else we need to worry about? Do they ship AOT things? 13:59:13
@corngood:corngood.comCorngood

self-contained apphosts

This would be singlefilehost I believe. Let me see what one of those looks like after build.

14:00:07
@gggkiller:matrix.orgGGGAOT would indeed be an issue we need to worry about as well, I don't know how the AOT binaries are built, I'd need to check to see if they have ICU among the needed libraries14:00:06
@corngood:corngood.comCorngoodI sort of doubt they would have that magic foobar hash in them.14:00:35
@gggkiller:matrix.orgGGG let me check with patchcil 14:01:01
@gggkiller:matrix.orgGGGit's the only AOT program we have in nixpkgs afaik14:01:09
@corngood:corngood.comCorngoodBut are they statically or dynamically linked against the ssl shim?14:01:09
@gggkiller:matrix.orgGGGit should be static, since it's a self-contained binary14:01:34
@gggkiller:matrix.orgGGGit should only need the external deps, no runtime nor anything else14:01:42
@corngood:corngood.comCorngoodso AOT is always a single file?14:01:55
@gggkiller:matrix.orgGGGit has some auxliary files like the pdb and other native dlls (when nuget libraries use pinvoke), but I haven't seen AOT binaries with dlls14:02:40
@gggkiller:matrix.orgGGG* it has some auxliary files like the pdb and other native libraries (when nuget libraries use pinvoke), but I haven't seen AOT binaries with dlls14:02:46
@gggkiller:matrix.orgGGG

annoyingly, it seems like it doesn't add OpenSSL, ICU nor Kerberos to the needed section:

ggg@sora:~ » patchelf --print-needed /nix/store/q36hdx9n1svnxf8mg7pxjjhfz0arlicv-patchcil-0.2.2/lib/patchcil/patchcil                                                                                                                   1 ↵
libm.so.6
libc.so.6
ld-linux-x86-64.so.2                                                                                                                                                                                                                   /0.1s
ggg@sora:~ » patchelf --print-rpath /nix/store/q36hdx9n1svnxf8mg7pxjjhfz0arlicv-patchcil-0.2.2/lib/patchcil/patchcil 
$ORIGIN:/nix/store/vbrdc5wgzn0w1zdp10xd2favkjn5fk7y-glibc-2.40-66/lib                                                                                                                                                                  /0.1s
14:03:46
@gggkiller:matrix.orgGGG *

annoyingly, it seems like it doesn't add OpenSSL, ICU nor Kerberos to the needed section:

$ patchelf --print-needed /nix/store/q36hdx9n1svnxf8mg7pxjjhfz0arlicv-patchcil-0.2.2/lib/patchcil/patchcil
libm.so.6
libc.so.6
ld-linux-x86-64.so.2
$ patchelf --print-rpath /nix/store/q36hdx9n1svnxf8mg7pxjjhfz0arlicv-patchcil-0.2.2/lib/patchcil/patchcil 
$ORIGIN:/nix/store/vbrdc5wgzn0w1zdp10xd2favkjn5fk7y-glibc-2.40-66/lib
14:04:20
@corngood:corngood.comCorngood In case it helps you can get an AOT build (and various other things) like dotnet-sdk.tests.console.cs.aot.built or similar 14:07:26
@gggkiller:matrix.orgGGGoh nice14:07:41
@corngood:corngood.comCorngoodthere are tests for regular publish, single file, etc14:08:04
7 May 2025
@aerden:matrix.orgAerden joined the room.07:56:11

Show newer messages


Back to Room ListRoom Version: 9