Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cudaPackages.cuda-library-samples: Only enable on Linux, fix channel #279684

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

infinisil
Copy link
Member

@infinisil infinisil commented Jan 8, 2024

This very weirdly broke the channel evaluation: https://hydra.nixos.org/build/245871962

It appears that this attribute is only evaluated by Hydra, not by ofborg. So this wouldn't have been detected by CI anyways in the PR that introduced the problem: #276800.

However, due to #271123 (comment), the channel only broke once that was fixed with #278777

Whether the fix is good, I don't know, but the failing-on-darwin attribute doesn't exist anymore with this commit, making the tarball build succeed again:

nix-build pkgs/top-level/release.nix -A tarball

Ping @vcunat @NixOS/cuda-maintainers @amjoseph-nixpkgs @Mic92


Add a 👍 reaction to pull requests you find important.

This very weirdly broke the channel evaluation: https://hydra.nixos.org/build/245871962/nixlog/1

It appears that this attribute is only evaluated by Hydra, _not_ by
ofborg. So this wouldn't have been detected by CI anyways in the PR that
introduced the problem: NixOS#276800.

However, due to NixOS#271123 (comment),
the channel only broke once that was fixed with NixOS#278777

Whether the fix is good, I don't know, but the failing-on-darwin attribute
doesn't exist anymore with this commit, making the tarball build succeed
again:

    nix-build pkgs/top-level/release.nix -A tarball
Copy link
Contributor

@SomeoneSerge SomeoneSerge left a comment

Choose a reason for hiding this comment

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

The more cursed that the linked PR didn't even touch cuda-library-samples directly (must've relaxes some filters at the scope level?)

The "package" is in a pretty horrible shape, almost unmaintained, doesn't set neither platforms nor badPlatforms. It's also somehwat un-packageable: the upstream uses recursive-gnumake which eventually calls cmake.

I also think that optionalAttrs is a good way to create more eval erros in the future, but if this fixes Hydra right now we should just merge

Thanks for the ping and for the fix

@vcunat vcunat added the 1.severity: channel blocker Blocks a channel label Jan 8, 2024
@infinisil
Copy link
Member Author

The more cursed that the linked PR didn't even touch cuda-library-samples directly (must've relaxes some filters at the scope level?)

Yeah this was a pain to figure out. Apparently the files pkgs/test/cuda/*/extension.nix are being used to extend the cudaPackages set:

(callPackage ../test/cuda/cuda-samples/extension.nix {inherit cudaVersion;})
(callPackage ../test/cuda/cuda-library-samples/extension.nix {})

This is not great, it violates implicit Nixpkgs boundary: pkgs/test should only contain files to test the entire package set, the package set should not depend on this.

@infinisil
Copy link
Member Author

And only adding packages to a package set if they are supported on the platform is also very much not conventional. meta.platforms should be used instead..

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Jan 8, 2024
@infinisil infinisil merged commit 2148d8a into NixOS:master Jan 8, 2024
21 checks passed
@infinisil infinisil deleted the fix-cuda-eval-darwin branch January 8, 2024 22:14
@SomeoneSerge
Copy link
Contributor

And only adding packages to a package set if they are supported on the platform is also very much not conventional. meta.platforms should be used instead..

Tracking in #266475 (even if the title doesn't suggest)

pkgs/test/cuda/*/extension.nix are being used to extend the cudaPackages

Opened #279703. Not even sure how long they've been in test/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.severity: channel blocker Blocks a channel 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants