Show-case for nix-ld: run umodified zoom

I recently build nix-ld to run unmodified binaries. Since the current version of zoom seems to be stuck, I build a working example configuration for nix-ld: https://github.com/Mic92/nix-ld/blob/3d5ca66d585c644b66f15c2844d47de86d49d55e/examples/zoom.nix

You can run it after setting up nix-ld by downloading the repo:

$ nix-shell ./examples/zoom.nix
14 Likes

This is such a cool feature!
I think your nix-ld is going to make crazy shit possible:

1 - searching through different NixOS commits historically for a library version match
2 - doing it dynamically at startup by replacing the interpreter in the ELF header
(or replacing the default interpreter on NixOS)
3 - caching the determined results in a ā€œfingerprint fileā€ so that its faster next time.

Thereā€™s some idea here that you can maybe just copy dynamically linked binaries across machines but have all the library resolving be deterministic from nixpkgs is really insane.

Iā€™d love to work on that some more!
(Trying to figure out a PhD research area lol)

3 Likes

I think I did a mistake in my example and used the old version of zoom (by not modifying the hash). The new version reveals a bug in thread local storage of glibc that I still investigate. In the meantime I fixed the nixpkgs version here: zoom-us: 5.4.53350.1027 -> 5.4.57862.0110 by Mic92 Ā· Pull Request #109602 Ā· NixOS/nixpkgs Ā· GitHub

2 Likes

This is fixed now in patch musl to ignore TLS segment by Mic92 Ā· Pull Request #9 Ā· Mic92/nix-ld Ā· GitHub

2 Likes

Thank you for doing this, it is something I have thought about too, but didnā€™t have the skills/time, this is awesome!

2 Likes