!lymvtcwDJ7ZA9Npq:lix.systems

Lix Development

260 Members
(Technical) development of Lix, the package manager, a Nix implementation. Please be mindful of ongoing technical conversations in this channel.100 Servers

Load older messages


SenderMessageTime
23 Oct 2024
@k900:0upti.meK900That's kind of what the chroot store in very recent cppnix does15:50:19
@kfears:matrix.orgKFears (tragedy arc)Is it backported yet? Does it make sense for my use case?15:52:15
@k900:0upti.meK900Not backported, not sure if it makes sense because it might need nested container nonsense15:52:41
@kfears:matrix.orgKFears (tragedy arc)I really wish there was like a technical document on why paths need to be hardcoded...15:55:16
@kfears:matrix.orgKFears (tragedy arc)This is such a painful and sudden gotcha15:55:26
@k900:0upti.meK900It's literally everything15:55:42
@k900:0upti.meK900Most things don't expect relative paths15:55:46
@k900:0upti.meK900 Especially self-relative paths 15:55:54
@kfears:matrix.orgKFears (tragedy arc)I mean, shit, Nix patches ELF headers and messes with LD env vars15:59:00
@kfears:matrix.orgKFears (tragedy arc)I find it hard to think that paths are a harder problem15:59:22
@kfears:matrix.orgKFears (tragedy arc)So yeah, a design doc on why this makes sense would come in handy15:59:50
@k900:0upti.meK900Well the glibc dynamic loader really doesn't like relative paths 15:59:54
@k900:0upti.meK900For one 16:00:14
@kfears:matrix.orgKFears (tragedy arc)Anyway, do I just use the shared store from the host, and forget about trying to have separate stores in tmpdirs?16:00:34
@kfears:matrix.orgKFears (tragedy arc)I don't think it will be a problem for what I need, and the CppNix way of creating dummy derivations that do nothing and are spread over many files doesn't feel particularly attractive16:02:16
@kfears:matrix.orgKFears (tragedy arc). о О (it would be really nice to have SDKs for programming languages to create temp stores, overlay stores and perform other Nix-related ops)16:11:45
@navi:tchncs.de@navi:tchncs.de left the room.16:15:06
@aloisw:kde.orgaloisw
In reply to @k900:0upti.me
That's kind of what the chroot store in very recent cppnix does
What do you mean by that exactly?
16:58:42
@aktaboot:tchncs.deaktaboot changed their profile picture.19:54:03
@puck:puck.moepuck
In reply to @kfears:matrix.org
I mean, shit, Nix patches ELF headers and messes with LD env vars
nix doesn't; nixpkgs does. the two are distinct; and the primary reason this can't be done sensibly is because store paths will end up in places that are e.g. length prefixed, or otherwise can't change length
21:33:21
@kfears:matrix.orgKFears (tragedy arc)
In reply to @puck:puck.moe
nix doesn't; nixpkgs does. the two are distinct; and the primary reason this can't be done sensibly is because store paths will end up in places that are e.g. length prefixed, or otherwise can't change length
Right, about the Nix/Nixpkgs stuff. But I still don't get the whole thing about length prefixing and stuff
21:40:13
@puck:puck.moepuckwell, "/nix/store" isn't the same length as "/tmp/pytest-of-nixchad/pytest-31/popen-gw2/test_trivial_shebang0/store"21:48:19
@puck:puck.moepuckpatchelf does a lot of work (and not all of it perfect) to rewrite the store path21:48:31
@puck:puck.moepuck and e.g. nodejs can't work with rewritten paths at all 21:48:37
@kfears:matrix.orgKFears (tragedy arc)I still don't get how this is such a gigantic problem but I guess there's nothing to do about it22:05:30
@uep:matrix.orguepyou have to substitute the path into an executable, without changing the length and thus the offsets of all the following items, that would require re-linking everything and even knowing where the values that are offsets are22:42:27
@puck:puck.moepuck e.g. how would you update let path = "${storePath}"; in "the store path is ${builtins.stringLength path} characters long" 22:48:37
@kfears:matrix.orgKFears (tragedy arc)
In reply to @uep:matrix.org
you have to substitute the path into an executable, without changing the length and thus the offsets of all the following items, that would require re-linking everything and even knowing where the values that are offsets are
Ohhh. Right. Offsets... Well, that sounds bad, yeah
22:50:38
24 Oct 2024
@baloo_:matrix.orgbaloo joined the room.02:12:02
@esperlily:matrix.orgEsperLily [she/her] this is reminding me that when macOS switched to the read-only root filesystem we spent a while trying to decide if we could rewrite the entire store and all substitutes to a separate root that had the same length, e.g. /var/nix/s/ (i forget exactly what paths we considered) but we decided it was too much work and not necessarily reliable enough. we also considered just changing the store path on darwin for everyone and rebuilding the universe but nobody liked that either. so we ended up with the separate volume. 07:30:33

Show newer messages


Back to Room ListRoom Version: 10