!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

222 Members
71 Servers

Load older messages


SenderMessageTime
15 Nov 2024
@p14:matrix.orgp14(and fix it)11:21:57
@emilazy:matrix.orgemily here's the sketch: for every derivation producing a shared library, you want to use llvm-ifs to generate stubs from the libraries. you put those in dev, say 11:22:08
@p14:matrix.orgp14Makes sense.11:22:17
@emilazy:matrix.orgemily downstream derivations do not consume the library output at build time. they consume dev exclusively 11:22:23
@emilazy:matrix.orgemily and dev is ca-derivations 11:22:32
@emilazy:matrix.orgemily(can you have only some outputs be CA? probably not. so it's a pain with Nix already)11:22:39
@emilazy:matrix.orgemily(but you can split it up into a separate derivation, etc.)11:22:44
@p14:matrix.orgp14For the prototype is there a reason you can't make whole derivations ca, even if they are not reproducible?11:23:20
@emilazy:matrix.orgemilyyou then, as part of the final package fixed-point-taking, join up every package that depends on a stub with the corresponding actual library output, and patch up the executables to point to the real paths. (optional: fancy static dynamic loading stuff goes here for perf)11:23:21
@emilazy:matrix.orgemilythat's pretty much it. rebuilds of build tools still rebuild a lot11:23:34
@emilazy:matrix.orgemilybut if you change the implementation of a function in OpenSSL without adding or removing any symbols, and don't touch the headers, then the only rebuilds are executables that use OpenSSL and things depending on them11:23:54
@p14:matrix.orgp14Well, you could imagine trying to make the build tool that does the patching as small and reproducible as possible.11:24:02
@emilazy:matrix.orgemilyand the executable rebuilds are really cheap11:24:08
@emilazy:matrix.orgemilyjust some patching11:24:10
@emilazy:matrix.orgemilyso if you eliminate OpenSSL from your build tools, that means that OpenSSL updates become ~free11:24:15
@emilazy:matrix.orgemily a few thousand seds, basically 11:24:20
@p14:matrix.orgp14Sketch makes sense.11:24:32
@emilazy:matrix.orgemilyI wouldn't be opposed to helping trying to implement it, at least in the form of "oh, this is how you should handle X"11:24:53
@emilazy:matrix.orgemilyI doubt Nixpkgs will ever adopt this system, though11:24:59
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC)
In reply to @emilazy:matrix.org
here's the sketch: for every derivation producing a shared library, you want to use llvm-ifs to generate stubs from the libraries. you put those in dev, say
Looks like libgl or vulkan-loader
11:25:01
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC)Makes sense11:25:04
@emilazy:matrix.orgemilysufficiently ambitious projects like this go in my "for the Nix successor" folder :)11:25:15
@emilazy:matrix.orgemily
In reply to @aleksana:mozilla.org
Looks like libgl or vulkan-loader
yeah, except we patch in the final location at build-time
11:25:23
@emilazy:matrix.orgemilyso everything is still as early-bound, we just skip a lot of building when we know it would produce the same result11:25:34
@p14:matrix.orgp14
In reply to @emilazy:matrix.org
sufficiently ambitious projects like this go in my "for the Nix successor" folder :)
Right, so, where do we start boiling the ocean from? ;-)
11:25:41
@emilazy:matrix.orgemily this is really key to exploiting ca-derivations, because it's not very useful to know a library didn't really change if the actual library you build against changes 11:25:52
@emilazy:matrix.orgemilyand it's really silly that Unix merges the interface and implementation into one file11:26:02
@emilazy:matrix.orgemilybuilds don't look at the object code of the dynamic libraries they link against. why is it in the same file?11:26:19
@emilazy:matrix.orgemily
In reply to @p14:matrix.org
Right, so, where do we start boiling the ocean from? ;-)
I've got a five year plan…
11:26:40
@emilazy:matrix.orgemily(probably an underestimate)11:26:55

Show newer messages


Back to Room ListRoom Version: 9