!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

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

Load older messages


SenderMessageTime
17 Jul 2025
@reckenrode:matrix.orgRandy EckenrodeI have a fix for Darwin in my branch. It includes the headers always.00:23:24
@reckenrode:matrix.orgRandy EckenrodeNeed to get back to having time, so I cN finish splitting up my branch.00:23:46
@reckenrode:matrix.orgRandy Eckenrode * 00:23:52
@g.d:matrix.orgGrace
In reply to @reckenrode:matrix.org
Add NIX_CFLAGS_COMPILE = "-I${lib.getInclude stdenv.cc.libcxx}/include/c++/v1"; when stdenv.cc.isClang.
hmm, that didn’t seem to work. Same error
00:40:16
@g.d:matrix.orgGracethis is the derivation: https://privx.li/2PnPdlScU00:40:59
@g.d:matrix.orgGraceI’m not sure if this matters, but this is a weird package that includes a submodule, and it’s the submodule’s compilation that (seems to be) failing00:42:13
@g.d:matrix.orgGrace

The funny thing is that this submodule exists in the package tree and seems to be fine? but is horrifically antiquated - https://github.com/NixOS/nixpkgs/blob/nixpkgs-unstable/pkgs/development/libraries/isl/generic.nix

I tried putting in the depsBuildBuild = [ pkgs.buildPackages.stdenv.cc ]; which is on the package tree version as well, but it didn’t work

00:49:32
@reckenrode:matrix.orgRandy Eckenrode Do you have xcbuild as a nativeBuildInput? 00:59:05
@g.d:matrix.orgGracetrying that now. didn’t think of that since the original ISL package didn’t include it00:59:33
@g.d:matrix.orgGrace
In reply to @reckenrode:matrix.org
Do you have xcbuild as a nativeBuildInput?

slight change in error message (addition of “can be found with sysroot set”

       > checking whether /nix/store/4633qrh7xgiwlkv1n9qwvily3bl9zy7p-llvm-19.1.7-dev/bin/clang can find standard include files... no
       > checking for xcode-select... xcode-select
       > checking whether standard include files can be found with sysroot set... no
       > configure: error: Cannot find standard include files
       > configure: error: ./configure failed for interface
       > configure: error: ./configure failed for isl
       For full logs, run:
01:01:36
@mall0c:matrix.orgmall0chas anybody been able to get nh and nom to work with nix on macOS? Doesn’t seem to print any extra build information. Tried both the nh command and piping to nom14:45:13
@mall0c:matrix.orgmall0cOr is this only useful for nixOS?14:45:34
@gigamonster256:matrix.orggigamonster256nh darwin switch?14:46:33
@debtquity:matrix.orgdebtquity ah so the intermediate build output is only generated if there were any updates to nix store (ie, nix flake update) 15:20:21
@debtquity:matrix.orgdebtquity Should I continue to ignore the result directory? 16:40:00
@Cu3PO42:matrix.orgCu3PO42 I just ran into an interesting issue. macOS doesn't like it when the interpreter in a shebang is another script. This breaks patchShebangs with bun, for example (since bun provided by Nix is wrapped). On the one side, I can easily work around this, on the other this seems universal enough that I would expect there to be an established fix. 20:25:45
@Cu3PO42:matrix.orgCu3PO42 That said, I haven't found anything so far. The easiest way to fix this, it seems, would be to prepend env (or maybe env -S if there's an additional argument) in the affected cases. I suppose I'll create an issue. 20:35:55
@reckenrode:matrix.orgRandy Eckenrode
In reply to @Cu3PO42:matrix.org
I just ran into an interesting issue. macOS doesn't like it when the interpreter in a shebang is another script. This breaks patchShebangs with bun, for example (since bun provided by Nix is wrapped). On the one side, I can easily work around this, on the other this seems universal enough that I would expect there to be an established fix.
makeBinaryWrapper is the standard solution.
23:22:15
18 Jul 2025
@sellout:matrix.orgselloutAh, I ran into that myself once: https://github.com/NixOS/nix/issues/948804:39:39
@Cu3PO42:matrix.orgCu3PO42 Thanks for pointing me in that direction! For now I went with the simple solution of patching the shebang myself and setting env as the interpreter. I still want to open an issue upstream to see if people would be amenable to slightly increasing the power of patchShebangs to account for this. 06:10:29
@Cu3PO42:matrix.orgCu3PO42Thanks for adding that reference! I didn't find that issue :-) (I naively only searched in nixos/nixpkgs).06:11:19
@keirioats:matrix.orgKeir LawsonDumb question, I have nix Darwin set up with flakes I believe, how do I trigger a general update of packages?10:04:45
@k900:0upti.meK900 nix flake update? 10:09:01
@prince213:matrix.orgprince213If you have Homebrew then also maybe brew update && brew upgrade10:37:56
@sarahec:matrix.orgSarah Clark

Assuming you're using nix-darwin:

nix flake update
darwin-rebuild switch --flake {path-to-flake}
16:23:08
@sarahec:matrix.orgSarah Clark You might need to put sudo before the rebuild 16:23:44
@sarahec:matrix.orgSarah ClarkWhat's the easiest way to get a Darwin reviewer on a PR?18:35:54
@sarahec:matrix.orgSarah Clark* What's the best way to get a Darwin reviewer on a PR?18:36:29
@toonn:matrix.orgtoonn Pinging darwin-maintainers, or darwin-core but that's reserved for *serious* business. 18:40:05
@sarahec:matrix.orgSarah ClarkThank you18:40:52

There are no newer messages yet.


Back to Room ListRoom Version: 6