!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

1162 Members
β€œThere are still many issues with the Darwin platform but most of it is quite usable.” β€” http://yves.gnu-darwin.org188 Servers

Load older messages


SenderMessageTime
1 Nov 2025
@saiko:knifepoint.netKatalin πŸ”ͺ especially since I'm working on making Swift support in Meson better 00:32:08
@saiko:knifepoint.netKatalin πŸ”ͺ but also just in general 00:32:15
@niklaskorz:matrix.orgniklaskorzso I'm still not sure if that either just doesn't work or I'm looking in the wrong place09:51:43
@niklaskorz:matrix.orgniklaskorz
diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix
index cc53957eee0d..15f76c9fbe53 100644
--- a/pkgs/stdenv/cross/default.nix
+++ b/pkgs/stdenv/cross/default.nix
@@ -69,6 +69,7 @@ lib.init bootStages
           extraNativeBuildInputs =
             old.extraNativeBuildInputs
             ++ lib.optionals (hostPlatform.isLinux && !buildPlatform.isLinux) [ buildPackages.patchelf ]
+            ++ lib.optionals (buildPlatform.isDarwin && !hostPlatform.isDarwin) [ buildPackages.apple-sdk ]
             ++ lib.optional (
               let
                 f =
09:51:52
@niklaskorz:matrix.orgniklaskorzthis doesn't fix the build issue unfortunately, same result as before09:52:04
@niklaskorz:matrix.orgniklaskorzalso there generally is no way to pass RUSTFLAGS to the build script compilation it seems10:06:52
@niklaskorz:matrix.orgniklaskorza PR in 2017 was rejected: https://github.com/rust-lang/cargo/pull/442810:07:00
@niklaskorz:matrix.orgniklaskorz

The flag is not passed to all compiler instances: When cross-compiling (i.e., when --target is set), the flag is not passed to build scripts. It seems there is currently no way to pass anything to build scripts when --target is set, which clearly is a feature gap.

10:07:27
@niklaskorz:matrix.orgniklaskorzupstream issue: https://github.com/rust-lang/cargo/issues/442310:08:15
@niklaskorz:matrix.orgniklaskorzI feel like this is the actual cause of the issue we're seeing πŸ˜…10:09:06
@niklaskorz:matrix.orgniklaskorzalso from the cargo docs:10:13:44
@niklaskorz:matrix.orgniklaskorz

If the --target flag (or build.target) is used, then the flags will only be passed to the compiler for the target. Things being built for the host, such as build scripts or proc macros, will not receive the args. Without --target, the flags will be passed to all compiler invocations (including build scripts and proc macros) because dependencies are shared. If you have args that you do not want to pass to build scripts or proc macros and are building for the host, pass --target with the host triple.

10:13:46
@reckenrode:matrix.orgRandy Eckenrode If you nix develop the failing drv, what does the environment look like? DEVELOPER_DIE_FOR_BUILD should be set. 10:33:23
@reckenrode:matrix.orgRandy Eckenrode * If you nix develop the failing drv, what does the environment look like? DEVELOPER_DIR_FOR_BUILD should be set. 10:33:34
@niklaskorz:matrix.orgniklaskorz
bash-5.3$ echo $DEVELOPER_DIR_FOR_BUILD/
/nix/store/ybygcq3s191f07bwgxbqpgqv0ak4h17k-apple-sdk-11.3/
10:36:46
@reckenrode:matrix.orgRandy EckenrodeSo it is getting set but not used.10:37:34
@reckenrode:matrix.orgRandy EckenrodeAnd libiconv is in the appropriate deps packages list?10:39:22
@niklaskorz:matrix.orgniklaskorzyeah I tried both nativeBuildInputs as well as depsBuildBuild10:43:43
@reckenrode:matrix.orgRandy EckenrodeI meant in the build environment.11:25:50
@emilazy:matrix.orgemilyI would try adding this in the native stdenv instead perhaps15:07:41
@niklaskorz:matrix.orgniklaskorzdid that too15:07:52
@niklaskorz:matrix.orgniklaskorzno change in behavior, alas15:08:02
@niklaskorz:matrix.orgniklaskorz(much recompiling for no seeming effect today^^)15:08:31
@niklaskorz:matrix.orgniklaskorz* (much recompiling for seemingly no effect today^^)15:08:38
@niklaskorz:matrix.orgniklaskorz at least I now found out that rust has since added the ability to pass rustflags through the cargo config's [host] section 15:09:59
@niklaskorz:matrix.orgniklaskorzso I'll try adding the library search path to libiconv there as a sanity check15:10:16
@niklaskorz:matrix.orgniklaskorz * at least I now found out that rust has since added the ability to pass rustflags for build scripts through the cargo config's [host] section 15:10:29
@antifuchs:asf.computerantifuchscan I ask that somebody with nix-darwin permissions review and ideally merge https://github.com/nix-darwin/nix-darwin/pull/1431? it would help my dock configuration a lot if this went in (:16:51:19
@antifuchs:asf.computerantifuchs* (ooops, I should have asked in nix-darwin-dev)16:52:22
@winston:winston.shwinstonjust hit a build failure on staging for cctools trying to get rust 1.91 to build on aarch64-darwin https://github.com/NixOS/nixpkgs/pull/426586#issuecomment-347676048720:19:34

Show newer messages


Back to Room ListRoom Version: 6