!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

902 Members
For people hacking on the Nix package manager itself189 Servers

Load older messages


SenderMessageTime
25 Nov 2024
@p14:matrix.orgp14The next trick will be to write this as an overlay, stdenvStage, or minimal patch against nixpkgs that does this to everything through arcane magic.20:37:25
@emilazy:matrix.orgemily I think you can – just add multiple files and it can be git cloned? 20:37:34
@emilazy:matrix.orgemilywe need some of this ANSI art in Nixpkgs20:37:39
@p14:matrix.orgp14:D20:37:44
@p14:matrix.orgp14You can put multiple files in, but not multiple directories. They get rejected by the git remote when you try to push them.20:37:59
@p14:matrix.orgp14It was a fun little exercise but I can see there is quite a bit more work involved even when it comes to handling a single package. I'm actually not sure what to reach for to do something as simple as replacing nix paths in a binary; patchelf obviously is the thing to reach for when the strings appear in a specific place, but substituteAll barf'd on the null characters.20:39:53
@emilazy:matrix.orgemily I think Nixpkgs just uses sed for that 20:40:30
@emilazy:matrix.orgemily in e.g. remove-references-to 20:40:33
@p14:matrix.orgp14Yeah, I thought so too, but I had some issues. I may not have hit it with the stick hard enough.20:40:47
@emilazy:matrix.orgemilyyou might also want to add an example of a build tool that depends on a library, to screw all the nice properties up20:40:54
@p14:matrix.orgp14Well yeah; that's going to be the interesting/unfortunate case. I was thinking of that in the context of 'glibc' upgrades. ISTM that if you have to relink users of glibc, this means relinking the compiler, which then means everything that uses the compiler has to be rebuilt.20:41:38
@emilazy:matrix.orgemilyyes20:42:05
@emilazy:matrix.orgemily the alternative is letting buildPackages drift etc., which isn't fun 20:42:21
@emilazy:matrix.orgemilyultimately compiler upgrades are compiler upgrades. what I worry about is more, like, random build stuff that has OpenSSL dependencies20:42:43
@emilazy:matrix.orgemilyfor hashing or because it has network functionality we don't use or – whatever20:42:51
@p14:matrix.orgp14So I was wondering about how you could make stdenv.mkDerivation do what the gist above does under the hood. Perhaps by modifying how getDev works; I think this would be enough to handle buildInputs. Then you'd need some way to make packages 'be observed as' the relink.20:44:42
@p14:matrix.orgp14Any bright ideas about where such logic could hide?20:44:54
@emilazy:matrix.orgemilyit's basically splicing in miniature I think.20:46:10
@emilazy:matrix.orgemilythe hard part is making relinking happen.20:46:21
@p14:matrix.orgp14That's about where I was up to :)20:46:24
@p14:matrix.orgp14Another thing I was wondering about was the eval cost of all of this, and whether that is an issue or not (for the likes of ofborg).20:47:03
@trofi:matrix.org@trofi:matrix.org
In reply to @Ericson2314:matrix.org
trofi: I think it can go directly to master, no?
Good catch! Updated as https://github.com/NixOS/nixpkgs/pull/359098#issuecomment-2499050124 (don't know why I did staging last time, possibly because the initial change I had to mitigate was introduced in staging)
21:31:08
26 Nov 2024
@softinio:matrix.orgSalar Rahmanian (softinio) joined the room.18:15:37
27 Nov 2024
@emilazy:matrix.orgemily John Ericson: re recent ca-derivations posts, you're aware that as of present it breaks aarch64-darwin basically entirely right? 02:42:56
@emilazy:matrix.orgemily(I assume there is no obstacle to rolling it out for Linux only, and there are things that could be done to fix the incompatibility with engineering work, but I just wanted to check that you know this)02:43:16
@emilazy:matrix.orgemily(happy to discuss more)02:43:39
@Ericson2314:matrix.orgJohn Ericson @emilazy:matrix.org: err nope I'm not aware of this 02:44:52
@emilazy:matrix.orgemily ok. so on aarch64-darwin, every binary must include a code signature or it won't start up. we use "ad-hoc signatures" for everything at present, which is what you get by default when running a compiler and is basically just an SHA-1 hash 02:46:05
@emilazy:matrix.orgemily every time a binary is rewritten it must be re-signed, which all the basic tools (install_name_tool which is like macOS patchelf etc.) do out of the box 02:46:28
@emilazy:matrix.orgemilytherefore rewriting binaries for CA self-references breaks them02:46:37

Show newer messages


Back to Room ListRoom Version: 6