From 90ec09d3969e5f0277654fe4e275d988082e8205 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 19 Apr 2025 22:04:47 +0100 Subject: [PATCH] zed-editor.tests: fix the eval MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without the change the eval fails as: $ nix build --no-link -f. zed-editor.tests error: … while evaluating the attribute 'withGles' at pkgs/by-name/ze/zed-editor/package.nix:322:9: 321| // lib.optionalAttrs stdenv.hostPlatform.isLinux { 322| withGles = finalAttrs.finalPackage.override { withGLES = true; }; | ^ 323| }; … while evaluating the attribute 'finalPackage.override' at pkgs/stdenv/generic/make-derivation.nix:87:40: 86| # An infinite recursion here can be caused by having the attribute names of expression `e` in `.overrideAttrs(finalAttrs: previousAttrs: e)` depend on `finalAttrs`. Only the attribute values of `e` can depend on `finalAttrs`. 87| args = rattrs (args // { inherit finalPackage overrideAttrs; }); | ^ 88| # ^^^^ error: attribute 'override' missing at pkgs/by-name/ze/zed-editor/package.nix:322:20: 321| // lib.optionalAttrs stdenv.hostPlatform.isLinux { 322| withGles = finalAttrs.finalPackage.override { withGLES = true; }; | ^ 323| }; --- pkgs/by-name/ze/zed-editor/package.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ze/zed-editor/package.nix b/pkgs/by-name/ze/zed-editor/package.nix index d467d5cec3b0..bd35f16211cd 100644 --- a/pkgs/by-name/ze/zed-editor/package.nix +++ b/pkgs/by-name/ze/zed-editor/package.nix @@ -43,6 +43,7 @@ withGLES ? false, buildRemoteServer ? true, + zed-editor, }: assert withGLES -> stdenv.hostPlatform.isLinux; @@ -319,7 +320,7 @@ rustPlatform.buildRustPackage (finalAttrs: { }; } // lib.optionalAttrs stdenv.hostPlatform.isLinux { - withGles = finalAttrs.finalPackage.override { withGLES = true; }; + withGles = zed-editor.override { withGLES = true; }; }; };