Skip to content

Proposal: explicit (temporary) name for darwin SDK check #175862

Description

@ylh

#175653 (comment) was written somewhat tongue-in-cheek, but I stand by the core idea:

While the SDK situation on x86_64-darwin gets figured out, we could do with an interim solution for expressing brokenness as a result of the 10.12 SDK getting long in the tooth, and it could do with a name. The value would be along the lines of:

stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "10.13"

(can't be just the latter as darwinSdkVersion still evaluates to something on Linux)

Currently, others and I have been using broken = stdenv.isDarwin && stdenv.isx86_64 in those situations, especially to correct spurious broken = stdenv.isDarwin, but that's not really what we're trying to express here, and it unfortunately won't cause rebuilds when the x86_64 SDK does get bumped.

The idea behind giving it a name is that:

  • it's concise,
  • it encourages people to actually use it, and
  • its references and definition can be easily grepped and edited out of existence once it's no longer necessary.

The questions I have for the maintainers are:

  • Is this a good idea?
  • What would be a good name? isOldDarwinSdk doesn't exactly roll off the fingers.
  • Should it be a function in lib that takes a platform (if so, where in lib), or would it be acceptable to directly apply it and pollute stdenv's namespace for the sake of concision, bearing in mind that it's temporary?

Once I get some feedback, I'll put in a proper PR accordingly.

Metadata

Metadata

Assignees

No one assigned

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions