python314Packages.ray: fix the eval

Without the change the eval fails in an obscure way
by trying to evaluate set as a string:

    $ nix build -f. python314Packages.ray.src
    error:
       … while calling a functor (an attribute set with a '__functor' attribute)
         at pkgs/development/python-modules/ray/default.nix:116:5:
          115|     in
          116|     fetchPypi {
             |     ^
          117|       inherit pname version format;

       … while evaluating a branch condition
         at lib/customisation.nix:199:7:
          198|       in
          199|       if isAttrs result then
             |       ^
          200|         result

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

       error: cannot coerce a set to a string: { }

After the change the failure is reported via catchable `throw`:

    $ nix build -f. python314Packages.ray.src
    error:
       … while calling a functor (an attribute set with a '__functor' attribute)
         at pkgs/development/python-modules/ray/default.nix:116:5:
          115|     in
          116|     fetchPypi {
             |     ^
          117|       inherit pname version format;

       … while evaluating a branch condition
         at lib/customisation.nix:199:7:
          198|       in
          199|       if isAttrs result then
             |       ^
          200|         result

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

       error: No hash specified for 'x86_64-linux.cp314'
This commit is contained in:
Sergei Trofimovich
2025-12-22 22:28:54 +00:00
parent b1703f49e5
commit a26a9727af
@@ -119,7 +119,9 @@ buildPythonPackage rec {
python = pyShortVersion;
abi = pyShortVersion;
platform = platforms.${stdenv.hostPlatform.system} or { };
sha256 = hashes.${stdenv.hostPlatform.system}.${pyShortVersion} or { };
sha256 =
hashes.${stdenv.hostPlatform.system}.${pyShortVersion}
or (throw "No hash specified for '${stdenv.hostPlatform.system}.${pyShortVersion}'");
};
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [