!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

1097 Members
“There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org169 Servers

Load older messages


SenderMessageTime
13 Jul 2025
@ethancedwards8:matrix.orgethancedwards8Thank you for explaining19:50:10
@reckenrode:matrix.orgRandy Eckenrode * 19:51:16
@reckenrode:matrix.orgRandy EckenrodeIt’s a mostly harmless violation, but it’s not intended by Apple or LLVM that they have the same ABI, so things can potentially break.19:51:36
@reckenrode:matrix.orgRandy EckenrodeI tried using a different ABI namespace in nixpkgs, but that broke libtorch-bin.19:54:44
@tga__:matrix.orgthegrayarea joined the room.22:19:38
14 Jul 2025
@zhaofeng:zhaofeng.liZhaofeng Li

A few days late again, but NFC in MacBooks? Sign me up

https://9to5mac.com/2025/07/09/exclusive-macos-26-beta-hints-at-sealed-mac-updates-at-apple-stores/

01:14:19
@zhaofeng:zhaofeng.liZhaofeng LiI assume they can't do this with Mac minis since they have no batteries01:14:26
@JoelMcCracken:matrix.orgJoelMcCrackenOh, got it, thank you for explaining. Now at least I know the reason. The main thing I want is some kind of way to actually learn nixos in a convenient environment instead of needing to deal with a VPS. Oh well. A full on VM isn't so bad. 18:43:46
@emilazy:matrix.orgemilya VM will be much better18:46:53
@JoelMcCracken:matrix.orgJoelMcCracken So i've been on a bit of a quest to figure out how to make haskell "static-ish" executables for macos, where it links as much as possible directly into the executable, but does rely upon macos libs when those are requried, like libc is IIUC. Any advice on this? One thing I notice is that I've used nix setup that will build an executable that (afaict so far) does what I want, and it does link to some system dylibs, but looking at the libs via otool -L, there are dylibs mentioned that dont' actually exist at that path on my system, but the tool seems to execute. Any ideas/input? The more direct question I have is, how does macos actually find a dylib, and how can I tell which ones "come with" macos? 18:49:46
@JoelMcCracken:matrix.orgJoelMcCrackenoh it seems like yall were talking about something similar to this earlier18:51:31
@emilazy:matrix.orgemily pkgsStatic should do it 18:51:32
@emilazy:matrix.orgemilyit builds static-except-for-system-libraries binaries on macOS18:51:49
@JoelMcCracken:matrix.orgJoelMcCrackenty18:53:13
@JoelMcCracken:matrix.orgJoelMcCracken hmm, I see that the proejct i'm referencing that seems to do what I'm trying doesn't use pkgsStatic; i'll have to dig some more 18:59:34
@JoelMcCracken:matrix.orgJoelMcCrackenonly (current) reference I can find to pkgsStatic in the project https://github.com/input-output-hk/haskell.nix/blob/master/overlays/musl.nix#L219:02:49
@JoelMcCracken:matrix.orgJoelMcCrackenI was able to build it locally https://github.com/input-output-hk/haskell.nix/tree/19ff56a902b173be9589166d8ea4ccc538b8ca78/nix-tools/static on macos x86_64 and am observing the linking to libs that aren't located where the paths point19:04:35
@emilazy:matrix.orgemily I don't know about haskell.nix (it's separate to the Haskell packaging infrastructure in Nixpkgs) but this seems highly overengineered for the task 19:05:29
@emilazy:matrix.orgemily pkgsStatic.callPackage ./my-package.nix { } should be sufficient 19:05:37
@JoelMcCracken:matrix.orgJoelMcCrackenyeah, main reason I want to use it is because it supports both stack and cabal19:06:16
@JoelMcCracken:matrix.orgJoelMcCrackenbut it may be that this is just the wrong way to go about solving it19:06:53
@emilazy:matrix.orgemilywell, it's trying to link against the non-NixOS system dynamic linker on Linux19:07:58
@emilazy:matrix.orgemilywhich is 😱19:08:01
@mall0c:matrix.orgmall0creferring to this? https://github.com/input-output-hk/haskell.nix/blob/19ff56a902b173be9589166d8ea4ccc538b8ca78/nix-tools/static/packaging.nix#L19-L2321:51:59
@emilazy:matrix.orgemilymuch of that file yes22:09:46
@emilazy:matrix.orgemilyit's very cursed22:09:50
15 Jul 2025
@toonn:matrix.orgtoonn How else is the I assume not quite static binary supposed to find the dynamic linker on arbitrary Linux distributions? 11:16:37
@JoelMcCracken:matrix.orgJoelMcCracken oh, that? 20:51:14
@JoelMcCracken:matrix.orgJoelMcCrackenare you saying the entire notion of what i'm asking is wrong? on darwin you can't have fully static binaries; my whole goal is to make an executable that will run without first having nix installed20:53:46
@emilazy:matrix.orgemily pkgsStatic will create a fully static executable on Linux and a mostly-static (no Nix dependencies) one on macOS 20:54:27

Show newer messages


Back to Room ListRoom Version: 6