Skip to content

Commit

Permalink
tests.cuda: inherit the ready cudaPackages_XX.cuda-samples
Browse files Browse the repository at this point in the history
...fixing the broken eval
  • Loading branch information
SomeoneSerge committed Jan 12, 2024
1 parent cdcd061 commit 27b277b
Showing 1 changed file with 48 additions and 29 deletions.
77 changes: 48 additions & 29 deletions pkgs/test/cuda/default.nix
Original file line number Diff line number Diff line change
@@ -1,32 +1,51 @@
{callPackage}:
{
lib,
recurseIntoAttrs,

rec {
cuda-samplesPackages = callPackage ./cuda-samples/generic.nix {};
inherit (cuda-samplesPackages)
cuda-samples_cudatoolkit_10
cuda-samples_cudatoolkit_10_0
cuda-samples_cudatoolkit_10_1
cuda-samples_cudatoolkit_10_2
cuda-samples_cudatoolkit_11
cuda-samples_cudatoolkit_11_0
cuda-samples_cudatoolkit_11_1
cuda-samples_cudatoolkit_11_2
cuda-samples_cudatoolkit_11_3
cuda-samples_cudatoolkit_11_4
;
cudaPackages,
cudaPackagesGoogle,

cuda-library-samplesPackages = callPackage ./cuda-library-samples/generic.nix {};
inherit (cuda-library-samplesPackages)
cuda-library-samples_cudatoolkit_10
cuda-library-samples_cudatoolkit_10_1
cuda-library-samples_cudatoolkit_10_2
cuda-library-samples_cudatoolkit_11
cuda-library-samples_cudatoolkit_11_0
cuda-library-samples_cudatoolkit_11_1
cuda-library-samples_cudatoolkit_11_2
cuda-library-samples_cudatoolkit_11_3
cuda-library-samples_cudatoolkit_11_4
;
cudaPackages_10_0,
cudaPackages_10_1,
cudaPackages_10_2,
cudaPackages_10,

__attrsFailEvaluation = true;
}
cudaPackages_11_0,
cudaPackages_11_1,
cudaPackages_11_2,
cudaPackages_11_3,
cudaPackages_11_4,
cudaPackages_11_5,
cudaPackages_11_6,
cudaPackages_11_7,
cudaPackages_11_8,
cudaPackages_11,

cudaPackages_12_0,
cudaPackages_12_1,
cudaPackages_12_2,
cudaPackages_12_3,
cudaPackages_12,
}@args:

let
isTest =
name: package:
builtins.elem (package.pname or null) [
"cuda-samples"
"cuda-library-samples"
"saxpy"
];
in
(lib.trivial.pipe args [
(lib.filterAttrs (name: _: lib.hasPrefix "cudaPackages" name))
(lib.mapAttrs (
_: ps:
lib.pipe ps [
(lib.filterAttrs isTest)
(as: as // { __attrsFailEvaluation = true; })
recurseIntoAttrs
]
))
recurseIntoAttrs
])

0 comments on commit 27b277b

Please sign in to comment.