Skip to content

cudaPackages: migrate to meta.problems - #533181

Open
ConnorBaker wants to merge 2 commits into
NixOS:masterfrom
ConnorBaker:feat/cuda-packages-meta-problems-minimal
Open

cudaPackages: migrate to meta.problems#533181
ConnorBaker wants to merge 2 commits into
NixOS:masterfrom
ConnorBaker:feat/cuda-packages-meta-problems-minimal

Conversation

@ConnorBaker

@ConnorBaker ConnorBaker commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Note

This PR was created with assistance from Claude Opus 4.8.

  • Adds unsupported to meta.problems; does not move or handle migration of unsupported platforms/unsupported attribute.
  • Removes the home-grown brokenAssertions and platformAssertions we had in _cuda.lib and cudaPackages.

Prior discussion:

Things done

@ConnorBaker ConnorBaker self-assigned this Jun 19, 2026
@ConnorBaker ConnorBaker added 0.kind: enhancement Add something new or improve an existing system. 6.topic: cuda Parallel computing platform and API labels Jun 19, 2026
@nixpkgs-ci nixpkgs-ci Bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jul 7, 2026
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>
@ConnorBaker
ConnorBaker force-pushed the feat/cuda-packages-meta-problems-minimal branch from 46956b9 to a4cc5bc Compare July 20, 2026 23:46
@nixpkgs-ci nixpkgs-ci Bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Jul 21, 2026
Assisted-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ConnorBaker
ConnorBaker force-pushed the feat/cuda-packages-meta-problems-minimal branch from a4cc5bc to 0133e7d Compare July 21, 2026 00:17
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: stdenv Standard environment labels Jul 21, 2026
@ConnorBaker
ConnorBaker force-pushed the feat/cuda-packages-meta-problems-minimal branch from 0133e7d to a539e9c Compare July 21, 2026 04:10
@nixpkgs-ci nixpkgs-ci Bot added the llm-assisted Contributions that include code generation with LLMs label Jul 21, 2026
@ConnorBaker
ConnorBaker marked this pull request as ready for review July 21, 2026 04:40
@ConnorBaker
ConnorBaker requested review from a team and infinisil July 21, 2026 04:41

@GaetanLepage GaetanLepage left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not unsupported here?

@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Jul 21, 2026
@SomeoneSerge SomeoneSerge self-assigned this Jul 21, 2026
@infinisil

Copy link
Copy Markdown
Member

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) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@nixpkgs-ci nixpkgs-ci Bot added 2.status: merge conflict This PR has merge conflicts with the target branch and removed 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. labels Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.kind: enhancement Add something new or improve an existing system. 2.status: merge conflict This PR has merge conflicts with the target branch 6.topic: cuda Parallel computing platform and API 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: stdenv Standard environment 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. llm-assisted Contributions that include code generation with LLMs

Projects

Status: New
Status: No status

Development

Successfully merging this pull request may close these issues.

5 participants