22
22
else
23
23
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org
24
24
'' ;
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
+ } ;
25
37
in
26
38
compiler-nix-name : tool : {
27
39
# 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: {
42
54
# We need to use the github one (since it has settings to make hls build).
43
55
cabalProject = __readFile ( src + "/cabal.project" ) ;
44
56
configureArgs = "--disable-benchmarks --disable-tests" ;
45
- } ;
57
+ } // fix-x86_darwin-apple-sdk ;
46
58
happy = { version = "1.20.1.1" ; inherit cabalProjectLocal ; } ;
47
59
alex = { version = "3.2.7.3" ; inherit cabalProjectLocal ; } ;
48
60
cabal = {
@@ -55,5 +67,5 @@ compiler-nix-name: tool: {
55
67
# cabal = { src = { outPath = self.inputs.cabal; filterPath = { path, ... }: path; }; }
56
68
#
57
69
cabalProjectFileName = "cabal.bootstrap.project" ;
58
- } ;
70
+ } // fix-x86_darwin-apple-sdk ;
59
71
} . ${ tool } or fixed-versions . ${ tool } . ${ compiler-nix-name } or { }
0 commit comments