mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-17 20:09:26 +00:00
go_1_18: Use apple_sdk_11_0.callPackage
Go 1.18 requires a newer SDK than the one we build from sources. As a workaround we're making use of the SDK we're using for aarch64-darwin. This means Go 1.18 will not work on any Darwin systems that don't have forwards-compatible SDK versions with the particular package in question. We might need to mark Go packages broken based on the macOS version rather than just the platform and architecture. Until we find a better solution, Go packages will need to make sure to get all their (Darwin) system dependencies from the `apple_sdk_11_0`, this includes dependencies of build tools like `xcbuild`. For convenience `darwin.apple_sdk_11_0` has a `callPackage` attribute which provides the correct `stdenv` and `xcbuild` attributes as arguments. This function can be expanded to substitute other necessary arguments when they come up.
This commit is contained in:
parent
491ce92971
commit
00336e25bd
@ -13402,8 +13402,9 @@ with pkgs;
|
||||
buildPackages = buildPackages // { stdenv = buildPackages.gcc8Stdenv; };
|
||||
});
|
||||
|
||||
go_1_18 = callPackage ../development/compilers/go/1.18.nix {
|
||||
inherit (darwin.apple_sdk.frameworks) Security Foundation;
|
||||
# go 1.18 requires a newer Apple SDK to be build. See commit message for more details.
|
||||
go_1_18 = darwin.apple_sdk_11_0.callPackage ../development/compilers/go/1.18.nix {
|
||||
inherit (darwin.apple_sdk_11_0.frameworks) Security Foundation;
|
||||
};
|
||||
|
||||
go = go_1_18;
|
||||
@ -21750,7 +21751,9 @@ with pkgs;
|
||||
buildGo117Package = callPackage ../development/go-packages/generic {
|
||||
go = buildPackages.go_1_17;
|
||||
};
|
||||
buildGo118Package = callPackage ../development/go-packages/generic {
|
||||
|
||||
# go 1.18 requires a newer Apple SDK to be build. See commit message for more details.
|
||||
buildGo118Package = darwin.apple_sdk_11_0.callPackage ../development/go-packages/generic {
|
||||
go = buildPackages.go_1_18;
|
||||
};
|
||||
|
||||
@ -21759,7 +21762,9 @@ with pkgs;
|
||||
buildGo117Module = callPackage ../development/go-modules/generic {
|
||||
go = buildPackages.go_1_17;
|
||||
};
|
||||
buildGo118Module = callPackage ../development/go-modules/generic {
|
||||
|
||||
# go 1.18 requires a newer Apple SDK to be build. See commit message for more details.
|
||||
buildGo118Module = darwin.apple_sdk_11_0.callPackage ../development/go-modules/generic {
|
||||
go = buildPackages.go_1_18;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user