| 17 Oct 2025 |
ElvishJerricco | == musl is not the right semantics | 04:17:09 |
ElvishJerricco | as I already explained | 04:17:12 |
matthewcroughan | I was unsure and still kind of am unsure, in what circumstances this can be untrue | 04:17:12 |
ElvishJerricco | literally | 04:17:17 |
ElvishJerricco | literally the only correct situation for that condition is if the libc is glibc | 04:17:30 |
ElvishJerricco | not "not musl" | 04:17:33 |
matthewcroughan | I mean chill, if you don't want to explain this to me you don't have to | 04:17:35 |
matthewcroughan | But I'm in lib/systems/inspect.nix right now, and trying to figure it out | 04:17:45 |
matthewcroughan | isMusl =
with abis;
map (a: { abi = a; }) [
musl
musleabi
musleabihf
muslabin32
muslabi64
];
| 04:17:51 |
ElvishJerricco | Is this clear? There are other libcs than glibc or musl | 04:19:44 |
matthewcroughan | Like, however complex this is, it can't evaluate to anything other than the libc being equal to musl though can it? | 04:19:58 |
matthewcroughan | nix-repl> lib.systems.parse.abis
{
android = { ... };
androideabi = { ... };
eabi = { ... };
eabihf = { ... };
elf = { ... };
gnu = { ... };
gnuabi64 = { ... };
gnuabielfv1 = { ... };
gnuabielfv2 = { ... };
gnuabin32 = { ... };
gnueabi = { ... };
gnueabihf = { ... };
msvc = { ... };
musl = { ... };
muslabi64 = { ... };
muslabin32 = { ... };
musleabi = { ... };
musleabihf = { ... };
uclibc = { ... };
uclibceabi = { ... };
uclibceabihf = { ... };
unknown = { ... };
}
| 04:20:07 |
matthewcroughan | like, yes, there are crazy combos, but musl always means the libc is musl right? | 04:20:21 |
ElvishJerricco | yes, but like I've said already, the condition is not about musl | 04:20:53 |
ElvishJerricco | musl / glibc is not a binary | 04:20:58 |
ElvishJerricco | it's not one or the other | 04:21:00 |
ElvishJerricco | the thing we care about here is if the libc is literally glibc. Is it clear that "not musl" is not equal to "is glibc"? | 04:21:22 |
ElvishJerricco | because "is glibc" is the correct semantics | 04:21:27 |
matthewcroughan | I wonder now how hostPlatform.libc even gets defined | 04:21:49 |
ElvishJerricco | https://github.com/NixOS/nixpkgs/blob/ff84020dd9cc87bab5c2675d62e555afeb09304f/lib/systems/default.nix#L120 | 04:22:09 |
matthewcroughan | like what comes first, isMusl = or libc = | 04:22:11 |
ElvishJerricco | now, admittedly, that code is a little flawed, in that it assumes that if any of those other conditions isn't true then it should fallback to glibc, but that's its own bug and not relevant to using the correct semantics in this PR | 04:22:52 |
matthewcroughan | Okay so the libc is itself defined in terms of isMusl | 04:22:54 |
ElvishJerricco | among a big list of other things | 04:23:08 |
matthewcroughan | so isMusl seems to come firt? | 04:23:08 |
matthewcroughan | * so isMusl seems to come first? | 04:23:10 |
ElvishJerricco | do you see all those other conditions? | 04:23:17 |
ElvishJerricco | Is it clear that musl and glibc are not the only possible libc? | 04:23:38 |
matthewcroughan | IDK what semantics are | 04:23:48 |
matthewcroughan | you seem to be 200% more informed than I am | 04:23:53 |