From a26a9727af4d728db25f2bf5df1d3631ad7ad6f8 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 22 Dec 2025 22:26:24 +0000 Subject: [PATCH] python314Packages.ray: fix the eval MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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' --- pkgs/development/python-modules/ray/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/ray/default.nix b/pkgs/development/python-modules/ray/default.nix index 5a3c141bf44e..3041b01a1141 100644 --- a/pkgs/development/python-modules/ray/default.nix +++ b/pkgs/development/python-modules/ray/default.nix @@ -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 [