!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

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

Load older messages


SenderMessageTime
25 Nov 2025
@samasaur:matrix.orgsamasauri would be pretty surprised if it was something in nix-darwin02:20:11
@samasaur:matrix.orgsamasaur perhaps it's a different thing you're using? buildEnv has some use cases in package definitions as well 02:20:38
@megmug:matrix.orgmegmugDownload shell.nix10:44:01
@megmug:matrix.orgmegmugHello there, is it expected on a semi recent nixpkgs unstable commit, to have system libraries like iostream unavaillable on MacOS? I've been struggling getting a Linux project to build with a basic nix-shell that tries to use the clangStdenv10:44:24
@megmug:matrix.orgmegmugI'm thinking I'm probably doing something wrong but I can't find a lot of info on the web10:45:06
@megmug:matrix.orgmegmugI'm trying to compile a simple module like this, and I just can't get it to find iostream10:48:00
@megmug:matrix.orgmegmugDownload cli.cppm10:48:10
@k900:0upti.meK900 I don't think we really have C++ modules working 10:55:30
@k900:0upti.meK900On any of the compilers10:55:37
@k900:0upti.meK900 It needs some cc-wrapper fixing but nothing uses them or can agree on how to use them 10:55:53
@k900:0upti.meK900So no one did the work10:56:13
@megmug:matrix.orgmegmugOk, so it's probably an interaction with the modules? Without modules, it should work?10:56:38
@k900:0upti.meK900 Yes 10:56:58
@megmug:matrix.orgmegmugThat would help since the project is early anyways, can go back to headers still10:57:01
@megmug:matrix.orgmegmugThank you!10:57:16
@megmug:matrix.orgmegmugIt's interesting though that it already works on linux10:57:26
@megmug:matrix.orgmegmugAlso, it didn't fail immediately - the same module using stdio.h + printf works on macos10:58:55
@reckenrode:matrix.orgRandy EckenrodeC++ modules support is fixed on staging.11:32:05
@reckenrode:matrix.orgRandy Eckenrodehttps://github.com/NixOS/nixpkgs/pull/46274711:32:44
@reckenrode:matrix.orgRandy Eckenrode A change was made to fix clang foo.cpp that broke clang-scan-deps, which CMake uses for module support. 11:33:50
@reckenrode:matrix.orgRandy Eckenrode It had to be ported to the clang-tools wrapper, which would have gone to master if not for the large number of Linux rebuilds it caused. 11:34:43
@megmug:matrix.orgmegmugAha - could this possibly affect non-module projects as well then? Because I am still getting errors despite removing all the modules. clang-scan-deps fails to find some stuff (on macos).11:37:28
@reckenrode:matrix.orgRandy Eckenrode If it uses clang-scan-deps, it will be broken. 11:39:02
@reckenrode:matrix.orgRandy Eckenrode Also clangd. 11:39:10
@reckenrode:matrix.orgRandy Eckenrode You may be able to work around it by setting env.NIX_CFLAGS_COMPILE to -isystem ${stdenv.cc.libcxx}. 11:42:42
@reckenrode:matrix.orgRandy Eckenrode * You may be able to work around it by setting env.NIX_CFLAGS_COMPILE to -isystem ${stdenv.cc.libcxx}/include/c++/v1. 11:43:01
@reckenrode:matrix.orgRandy Eckenrode(Path from memory, so may be off.)11:43:14
@megmug:matrix.orgmegmugHm, or just build the nix-shell on a different version maybe? Is the change already on master branch? Or can i go back far enough to get a version that didn't have the problem?11:44:38
@reckenrode:matrix.orgRandy EckenrodeIt’s on staging. It won’t make it to master until mid-December probably.11:47:04
@reckenrode:matrix.orgRandy EckenrodeIf you use staging, you’ll have to do a stdenv bootstrap and build everything from source.11:47:43

Show newer messages


Back to Room ListRoom Version: 6