zed-editor.tests: fix the eval

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|       };
This commit is contained in:
Sergei Trofimovich
2025-04-19 22:04:47 +01:00
parent ee446f457b
commit 90ec09d396
+2 -1
View File
@@ -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; };
};
};