Nix on macOS | 1167 Members | |
| “There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org | 189 Servers |
| Sender | Message | Time |
|---|---|---|
| 21 Oct 2025 | ||
| * Hello folks, I want to PR darwin support for libtree (analysis of linked libraries) and I have questions about tests. There's a
I presume that in this case libtree should always test the [Edit: I don't mean idiomatic way of implementing the changes, as opposed to the | 16:31:14 | |
| 18:35:15 | ||
| You might want to ask in https://matrix.to/#/%23cross-compiling:nixos.org. | 20:09:54 | |
I know there is a desire to move pkgsCross to variants.nix, which would prevent it from being used in nixpkgs. I assume that applies to passthru.tests. | 20:10:01 | |
| I feel like a better (more portable) test would be to use an unwrapped Clang and LLD to generate a shared library and link a trivial program against it. | 20:12:12 | |
(I bet pkgsStatic.libtree.tests.checkCoreUtils fails.) | 20:13:58 | |
* (I bet pkgsStatic.libtree.tests.checkCoreUtils fails on Linux.) | 20:14:16 | |
| does it only support ELF even on Darwin? | 20:14:45 | |
| looking at the code… does this program actually work on Darwin? | 20:15:34 | |
| it seems to make a fair few assumptions about the system being ELF-y | 20:15:40 | |
| Yes. There’s an open issue for Mach-O support, but it’s old. https://github.com/haampie/libtree/issues/22 | 20:16:05 | |
| I heard something about nixpkgs dropping x86_64-darwin support, is that discussion happpening anywhere easy to find? | 20:16:14 | |
it has paths like /usr/lib and /etc/ld.so.conf hardcoded though | 20:16:33 | |
| it's in the 25.11 release notes, https://github.com/NixOS/nixpkgs/pull/415566 | 20:16:47 | |
| I was meaning to post it on Discourse too though, I should do that | 20:16:56 | |
| Note that that wouldn’t happen until 26.11. The announcement about dropping support in DetNix is unrelated to our schedule. | 20:17:49 | |
| Does the latter even exist on NixOS? | 20:18:34 | |
| I think no, but I guess it can not-exist gracefully | 20:18:54 | |
| I'm just surprised if this program runs on macOS at all | 20:18:59 | |
| * | 20:49:58 | |
| 23:46:29 | |
*
This is the test result, making the above change to use the pkgsCross (but not pkgsStatic!) | 23:47:21 | |
| Thanks for your help. I should have been more explicit that this is working, reasonably, for me (I haven't used all the functionality but I have found it useful as a tool that works on macos that can analyze ELFs). I'll ask in the cross compile channel, when I return to this. | 23:50:07 | |
| no worries :) | 23:50:38 | |
| I agree with Randy Eckenrode about the best way to test it | 23:50:44 | |
pull in clang-unwrapped on all platforms and make a couple basic .sos with --target= | 23:51:16 | |
no need for pkgsCross | 23:51:25 | |
| 22 Oct 2025 | ||
| https://github.com/NixOS/nixpkgs/pull/454402 | 00:37:38 | |
| Darwin source release updates to 15.6 | 00:37:42 | |
| * | 00:39:25 | |