cudaPackages: migrate to meta.problems - #533181
Conversation
Adds `unsupported` to the set of problem kinds that may be specified in `meta.problems`, defaulting to an error that is bypassed by `allowUnsupportedSystem` (mirroring how `broken` is bypassed by `allowBroken`). This is purely additive: the legacy `meta.platforms`/`meta.badPlatforms` platform check in check-meta.nix is left untouched, so the two unsupported mechanisms coexist. Adds problems test cases covering the new kind: error-by-default (unsupported-manual), and the two bypass paths (allow-unsupported via config, allow-unsupported-env via NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM). Assisted-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
46956b9 to
a4cc5bc
Compare
Assisted-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
a4cc5bc to
0133e7d
Compare
0133e7d to
a539e9c
Compare
GaetanLepage
left a comment
There was a problem hiding this comment.
Few nits. Very nice addition.
| automatic = null; | ||
| }; | ||
| # A package that is legitimately not applicable to the current configuration (as opposed to | ||
| # `broken`, which signals a Nixpkgs-side bug). Defaults to an error that is bypassed by |
There was a problem hiding this comment.
broken = true can also mean that the package is broken because of upstream. I would either completely remove , which signals a Nixpkgs-side bug or replace it with , which signals the package is plainly failing to build currently or something like this.
| problems = | ||
| lib.optionalAttrs (lib.versionOlder finalAttrs.version "2022.2.0" && qt5 == null) { | ||
| qt5Missing = { | ||
| kind = "broken"; |
There was a problem hiding this comment.
Why not unsupported here?
|
Probably good to sync with #545234 |
| allCCNewerThan35 = allCCNewerThan50 || lib.all (lib.flip lib.versionAtLeast "3.5") cudaCapabilities; | ||
| in | ||
| # https://docs.nvidia.com/deeplearning/cudnn/archives/cudnn-850/support-matrix/index.html#cudnn-cuda-hardware-versions | ||
| lib.optionalAttrs (cudnnAtLeast85 && !allCCNewerThan35) { |
There was a problem hiding this comment.
I've been working on #545234 and I'm wondering how we can combine the efforts such that this get easier on your / the consumer side. IMO we should support a list of unsupported reasons where each carriers a condition value that is used for the gating so you don't have to do this verbose lib.optionalAttrs dance for every condition. Any thoughts?
Note
This PR was created with assistance from Claude Opus 4.8.
unsupportedtometa.problems; does not move or handle migration of unsupported platforms/unsupported attribute.brokenAssertionsandplatformAssertionswe had in_cuda.libandcudaPackages.Prior discussion:
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.