From 836e74d69553b74c557613e1763d99a0ffed0a6e Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 29 Dec 2023 14:07:43 +0000 Subject: [PATCH] python312Packages.array-record: improve eval error Before the change access to non-existent `.cp312` attribute caused irrecoverable eval failure: $ nix build --no-link -f. python312Packages.array-data ... error: attribute 'cp312' missing After the change we use `throw` fallback to turn the error into recoverable: $ nix build --no-link -f. python312Packages.array-data ... error: array-record is missing hash for cp312 The difference is visible when one tries to skip the derivations that throw errors. Irrecoverable eval errors do not allow skipping such derivations. --- pkgs/development/python-modules/array-record/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/array-record/default.nix b/pkgs/development/python-modules/array-record/default.nix index 0497c542fe24..3abe60f64d5e 100644 --- a/pkgs/development/python-modules/array-record/default.nix +++ b/pkgs/development/python-modules/array-record/default.nix @@ -31,7 +31,7 @@ buildPythonPackage rec { cp39 = "sha256-BzMOVue7E1S1+5+XTcPELko81ujc9MbmqLhNsU7pqO0="; cp310 = "sha256-eUD9pQu9GsbV8MPD1MiF3Ihr+zYioSOo6P15hYIwPYo="; cp311 = "sha256-rAmkI3EIZPYiXrxFowfDC0Gf3kRw0uX0i6Kx6Zu+hNM="; - }.${pyShortVersion}; + }.${pyShortVersion} or (throw "${pname} is missing hash for ${pyShortVersion}"); }; propagatedBuildInputs = [