update the reason why we have to use a newer sdk for macOS

This commit is contained in:
Jörg Thalheim 2023-09-13 08:07:32 +02:00
parent c3d7cbf19a
commit f6cddc0ed8
3 changed files with 11 additions and 7 deletions

View file

@ -23,8 +23,8 @@
let
pkgs = nixpkgs.legacyPackages.${system};
# The newer Darwin SDK does not exist in current (nixos-22.05) stable
# branches, so just fallback to the default callPackage.
# The current default sdk for macOS fails to compile go projects, so we use a newer one for now.
# This has no effect on other platforms.
callPackage = pkgs.darwin.apple_sdk_11_0.callPackage or pkgs.callPackage;
inherit (callPackage ./builder {

View file

@ -1,7 +1,7 @@
final: prev:
let
# The newer Darwin SDK does not exist in current (nixos-22.05) stable
# branches, so just fallback to the default callPackage.
# The current default sdk for macOS fails to compile go projects, so we use a newer one for now.
# This has no effect on other platforms.
callPackage = final.darwin.apple_sdk_11_0.callPackage or final.callPackage;
in
{

View file

@ -10,12 +10,16 @@
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
# The current default sdk for macOS fails to compile go projects, so we use a newer one for now.
# This has no effect on other platforms.
callPackage = pkgs.darwin.apple_sdk_11_0.callPackage or pkgs.callPackage;
in
{
packages.default = pkgs.callPackage ./. {
packages.default = callPackage ./. {
inherit (gomod2nix.legacyPackages.${system}) buildGoApplication;
};
devShells.default = pkgs.callPackage ./shell.nix {
devShells.default = callPackage ./shell.nix {
inherit (gomod2nix.legacyPackages.${system}) buildGoApplication mkGoEnv gomod2nix;
};
})