python3Packages.pytorch-bin.tests: fix the eval

Without the change the eval fails as:

    $ nix-instantiate -A python3Packages.pytorch-bin.tests
    error:
       … while calling a functor (an attribute set with a '__functor' attribute)
         at lib/customisation.nix:264:13:
          263|     in if missingArgs == {}
          264|        then makeOverridable f allArgs
             |             ^
          265|        # This needs to be an abort so it can't be caught with `builtins.tryEval`,

       … while evaluating a branch condition
         at lib/customisation.nix:148:7:
          147|     in
          148|       if isAttrs result then
             |       ^
          149|         result // {

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: function 'anonymous lambda' called with unexpected argument 'torchWithCuda'
       at pkgs/development/python-modules/torch/tests.nix:1:1:
            1| { callPackage }:
             | ^
            2|
This commit is contained in:
Sergei Trofimovich
2024-07-23 22:10:35 +01:00
parent 65f98a6801
commit f84f1c2744
@@ -121,10 +121,7 @@ buildPythonPackage {
pythonImportsCheck = [ "torch" ];
passthru.tests = callPackage ./tests.nix {
torchWithCuda = torch-bin;
torchWithRocm = torch-bin;
};
passthru.tests = callPackage ./tests.nix {};
meta = {
description = "PyTorch: Tensors and Dynamic neural networks in Python with strong GPU acceleration";