Let me know if I should move this to #dev:nixos.org, but I have a few questions about by-name .
I’m working on the Darwin SDK refactor. As part of that work, I want to move the SDK and source-releases out of os-specific/darwin to the by-name hierarchy. For the SDKs, this is mostly easy. I have a by-name/ap/apple-sdk folder with a package.nix . The source-releases are another matter (see below).
For the SDK, there will be multiple versions. For how to handle those, I can override apple-sdk in all-packages.nix . The question is, do I have to enumerate each versioned SDK package manually in all-packages.nix , or can I do the following?
inherit (callPackage ../by-name/ap/apple-sdk/all.nix { })
apple-sdk_10_12 apple-sdk_10_13 apple-sdk_10_14 apple-sdk_10_15
apple-sdk_11 apple-sdk_12 apple-sdk_13 apple-sdk_14;
For the source-releases, I need a scope. The SDK overrides packages in the scope to the versions it needs for that SDK version (e.g., the 11.3 SDK uses Csu 85 while the 14.4 SDK uses Csu 88). I know things in by-name need to be derivations, but is it keeping in the spirit to passthru a scope? Essentially, I have apple-oss/Csu , add that to a scope, and passthru the scope on the apple-oss derivation. The SDK can then do apple-oss.overrideScope , and things work as expected.
We’ve been talking about various options in #macos:nixos.org. One possibility is keeping it as a package with the other packages not nested (so by-name/ap/apple-oss-Csu , etc). Another is keeping the scope in os-specific/darwin/apple-oss , add it to all-packages.nix , and ignore the check failure in the PR. Not really sure what the best approach would be or what the plan is to handle scopes in by-name (if there is one).
|