!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

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

Load older messages


SenderMessageTime
17 Jan 2026
@emilazy:matrix.orgemily although that means targetPlatform evil 18:41:46
@reckenrode:matrix.orgRandy Eckenrode The problem is swiftc looks for its libraries in the path where it really is. 18:42:12
@reckenrode:matrix.orgRandy Eckenrode So if swiftc is a symlink, it will look in the swiftc package, but that package has no stdlib. 18:42:34
@reckenrode:matrix.orgRandy Eckenrode What I want is for it to look in the swift package that symlinks all the stuff together. 18:42:52
@reckenrode:matrix.orgRandy Eckenrode swiftc, swift-driver, swift-corelibs-xctest, swift-testing, (on Linux), swift-corelibs-foundation, etc. 18:43:23
@reckenrode:matrix.orgRandy Eckenrode * swiftc, swift-driver, the stdlib, swift-corelibs-xctest, swift-testing, (on Linux), swift-corelibs-foundation, etc. 18:43:49
@emilazy:matrix.orgemily right. unfortunate that that will involve targetPackages for a multi-target compiler but maybe we can figure something out with upstream one day 18:44:14
@emilazy:matrix.orgemilyhow does their whole cross SDK stuff work upstream?18:44:31
@reckenrode:matrix.orgRandy Eckenrode You specify --sdk <path to SDK>. 18:45:15
@reckenrode:matrix.orgRandy EckenrodeAFAIK18:45:16
@reckenrode:matrix.orgRandy EckenrodeThere are static Linux SDKs for various distros.18:45:27
@reckenrode:matrix.orgRandy Eckenrode * 18:45:48
@reckenrode:matrix.orgRandy EckenrodeSupporting cross-compilation is a non-goal currently for my Swift work. It doesn’t currently work. Having the stdlib separate at least moves us in the right direction.18:47:13
@reckenrode:matrix.orgRandy EckenrodeRight now I’m just looking for spliced packages in things that care about that.18:48:25
@reckenrode:matrix.orgRandy Eckenrodehttps://github.com/reckenrode/nixpkgs/blob/139e88d5b9ed888bc534afcb981c4d79698fecb3/pkgs/by-name/sw/swiftPackages/by-name/sw/swiftc/package.nix#L61-L9718:49:43
@reckenrode:matrix.orgRandy EckenrodeIf cross just happens to work, yay. I doubt it will, though we’re closer than we are currently.18:50:26
@emilazy:matrix.orgemilyI was wondering whether we can avoid this "looking at its own location" by just putting that stuff in the SDK.18:51:47
@emilazy:matrix.orgemily then the SDK is a build input, a la apple-sdk. the compiler could propagate the ones for the host and target platforms 18:52:45
@reckenrode:matrix.orgRandy Eckenrode We would have to vend a special SDK on Darwin that adds the Swift libs the apple-sdk. 19:30:39
@reckenrode:matrix.orgRandy EckenrodeMaybe we can do that, but it can be done in a follow up.19:30:56
@emilazy:matrix.orgemilyah, it expects the other macOS SDK stuff mixed in with the Swift stuff? fun20:39:11
@reckenrode:matrix.orgRandy Eckenrode It maps SDKROOT to --sdk automatically. 20:41:00
@emilazy:matrix.orgemilygotcha20:43:05
@ihar.hrachyshka:matrix.orgIhar Hrachyshkacompiler-rt build fix for x86_64-darwin is confirmed: https://github.com/NixOS/nixpkgs/pull/48088920:43:09
18 Jan 2026
@gigamonster256:matrix.orggigamonster256

I'm having trouble getting an app to run on x86_64-darwin derivation here: https://github.com/gigamonster256/opencode/blob/48050d51580cc332979c589e2ed260984f240cd6/nix/opencode.nix

opencode> 34 | export function systemArchitectureSync() {
opencode> 35 |  const {arch, platform, env} = process;
opencode> 36 |
opencode> 37 |  // Detect Node.js x64 binary running under Rosetta 2 on a ARM64 Mac.
opencode> 38 |  if (platform === 'darwin' && arch === 'x64') {
opencode> 39 |          const stdout = childProcess.execFileSync('sysctl', ['-inq', 'sysctl.proc_translated'], {encoding: 'utf8'});
opencode>                                    ^
opencode> error: Executable not found in $PATH: "sysctl"
opencode>       path: "sysctl",
opencode>      errno: -2,
opencode>    syscall: "spawnSync sysctl",
opencode>  spawnargs: [ "-inq", "sysctl.proc_translated" ],
opencode>     signal: null,
opencode>     status: undefined,
opencode>     output: [
opencode>   null, null, null
opencode> ],

any advice for making sure the sysctl command is found? some sort of wrapProgram? adding sysctl to buildInputs didnt seem to make a difference

00:15:08
@reckenrode:matrix.orgRandy Eckenrode Try adding it to nativeBuildInputs. 00:16:39
@gigamonster256:matrix.orggigamonster256no dice on that either iirc, I'll double check, the failure happens when running install checks and generating shell completions00:18:47
@reckenrode:matrix.orgRandy Eckenrodehttps://github.com/NixOS/nixpkgs/pull/477520#issuecomment-376454003800:45:49
@reckenrode:matrix.orgRandy Eckenrode While I wasn’t successful due to not having intentbuilderc, that’s promising. 00:46:09
19 May 2021
@grahamc:nixos.org@grahamc:nixos.org set the history visibility to "world_readable".19:22:35

Show newer messages


Back to Room ListRoom Version: 6