2222 else
2323 active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org
2424 '' ;
25+ fix-x86_darwin-apple-sdk = {
26+ modules = [ ( { pkgs , lib , ...} : {
27+ # error: use of undeclared identifier 'IP_RECVTOS'
28+ # for whatever reason nixpkgs 24.11 defines x86_64-darwin
29+ # to be sdk-10.12.2, and aarch64-darwin to be sdk-11.
30+ # nixpkgs 25.05 will drop sdk-10.12, and unify aarch64 and x86 at last.
31+ packages . network . components . library . libs = lib . mkIf ( pkgs . stdenv . hostPlatform . isDarwin && lib . versionOlder pkgs . apple-sdk . version "11" ) [
32+ pkgs . apple-sdk_11
33+ ( pkgs . darwinMinVersionHook "11.0" )
34+ ] ;
35+ } ) ] ;
36+ } ;
2537in
2638compiler-nix-name : tool : {
2739 # for HLS, we rely on the cabal.project configuration from the upstream project to have the correct configuration.
@@ -42,7 +54,7 @@ compiler-nix-name: tool: {
4254 # We need to use the github one (since it has settings to make hls build).
4355 cabalProject = __readFile ( src + "/cabal.project" ) ;
4456 configureArgs = "--disable-benchmarks --disable-tests" ;
45- } ;
57+ } // fix-x86_darwin-apple-sdk ;
4658 happy = { version = "1.20.1.1" ; inherit cabalProjectLocal ; } ;
4759 alex = { version = "3.2.7.3" ; inherit cabalProjectLocal ; } ;
4860 cabal = {
@@ -55,5 +67,5 @@ compiler-nix-name: tool: {
5567 # cabal = { src = { outPath = self.inputs.cabal; filterPath = { path, ... }: path; }; }
5668 #
5769 cabalProjectFileName = "cabal.bootstrap.project" ;
58- } ;
70+ } // fix-x86_darwin-apple-sdk ;
5971} . ${ tool } or fixed-versions . ${ tool } . ${ compiler-nix-name } or { }
0 commit comments