Skip to content

Commit 517aea5

Browse files
committed
fix the apple-sdk on x86_64-darwin
1 parent 91e6c1c commit 517aea5

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

tool-map.nix

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ let
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+
};
2537
in
2638
compiler-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

Comments
 (0)