MacOS build / deployment target version

I noticed that usually when building packages on darwin with SDK 11, there will often be a message like:

warning: 'futimens' is only available on macOS 10.13 or newer [-Wunguarded-availability-new]
note: 'futimens' has been marked as being introduced in macOS 10.13 here, but the deployment target is macOS 10.12.0

So ok, I know what it means, but it I’m confused why does it appear for packages built with darwin.apple_sdk_11_0.callPackage. Since we already require the later functionality, why isn’t that propagated to -mmacosx-version-min as well? (it’s mentioned as done for 10.12 in Nixpkgs macOS Stdenv Updates )

I was hoping someone has a good answer before I put on scuba gear and dive into the pkgs/os-specific/darwin where this happens:

pkgs/os-specific/darwin/cctools/apple.nix
31:    "MACOSX_DEPLOYMENT_TARGET=10.12"

but apple_sdk_11_0 doesn’t override it?

( @toonn ? @thefloweringash ? )

When I fixed 11.0 SDK build for x86_64-darwin, I kept the deployment target as 10.12 to match the default SDK’s deployment target. I was trying to be conservative about changing anything since I didn’t want to step on the toes of the source SDK bump. Once the source SDK update was complete, the intent was to change derivations back to using the source SDK that could be.

1 Like