Change:
substituteInPlace System/X509/MacOS.hs --replace security /usr/bin/security '' + (drv.postPatch or ""); }) super.x509-system; <ins> crypton-x509-system = overrideCabal (drv: lib.optionalAttrs (!pkgs.stdenv.cc.nativeLibc) { postPatch = '' substituteInPlace System/X509/MacOS.hs --replace security /usr/bin/security '' + (drv.postPatch or ""); }) super.crypton-x509-system; </ins> # https://github.com/haskell-foundation/foundation/pull/412 foundation = dontCheck super.foundation;

Discussion:
elm fails to build on MacOS (m2) - something related to how processes are spawned. The build fails with the message "ghc-9.6.4: security: createProcess: posix_spawnp: does not exist (No such file or directory)". Steps to reproduce the behavior: build Please run and paste the result. Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:
Thanks for report. Unfortunately this seems like a problem which can be very hard to debug. I will try to have a look but I'm afraid this is something that will require someone with the actual hardware to contribute the fix.
We're running into the same issue. Rolling back to Nixpkgs 23.11 seems to make everything behave nicely:
It looks like it's trying to invoke an executable and it's not available?
Is Apple's tool packaged in nixpkgs?
I believe this is the same problem as
Yes, but with git-annex it is easy to work around by simply disabling the offending test case(s). Here it seems that the ghc itself is calling it?
In #ghc chreekat pointed out the and the speculates it's due to the version of the security release. But there is no newer release of SecurityTool and the code does not seem to have made its way into Security so the only way forward I see is to patch the call to to use the impure unfortunately.
Did someone dig which invocation of security is Elm triggering?
I guess this likely comes from haskell-tls (from what said)
I lied, is included in the Security framework so if we get that building we might not need the impure ?
I think it's worth a shot.
Can someone take a look at this one?
I'm trying to install with devbox and am not familiar with nix. Is there any workaround? Edit: I was able to specify the package this way
The problem is in dependency chain, not with elm directly. Current workaround is to use old version of nixpkgs as you've seem to find out. There likely will be relatively simple solution but testing MacOS builds is very difficult for me so we're waiting for someone with the hardware at hand to fix it.
I have hardware at hand but I'm not sure what to try.

Does anyone have a draft change to start with?
I'm sorry, I'm very busy with with work and has renovations these days so I won't be able to help much with this. What I would try first is to pin down what dependecy of elm is failing to build by narrowing things down. My theory is that problem is with haskell-tls. First you'll need to identify it. Once that's done check relevant points from to fix it by overriding the depndecy: The problem seems to be related to call to Apple's security utility which we need to get from the OS. That I think should be the only problem there is. Once the dependency is able to call security, it should succeed compiling I think.
yeah, it's either or . UPD: sorry, should've read the previous messages