mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fix(flake.nix): synchronize playwright version in nix and package.json (#16715)
Ensure that the version of Playwright installed with the Nix flake is equal to the one specified in `site/package.json.` -- This assertion ensures that `pnpm playwright:install` will not attempt to download newer browser versions not present in the Nix image, fixing the startup script and reducing the startup time, as `pnpm playwright:install` will not download or install anything. We also pre-install the required Playwright web browsers in the dogfood Dockerfile. This change prevents us from redownloading system dependencies and Google Chrome each time a workspace starts. Change-Id: I8cc78e842f7d0b1d2a90a4517a186a03636c5559 Signed-off-by: Thomas Kosiewski <tk@coder.com> Signed-off-by: Thomas Kosiewski <tk@coder.com>
This commit is contained in:
@@ -121,6 +121,7 @@
|
||||
(pinnedPkgs.golangci-lint)
|
||||
gopls
|
||||
gotestsum
|
||||
hadolint
|
||||
jq
|
||||
kubectl
|
||||
kubectx
|
||||
@@ -216,6 +217,14 @@
|
||||
'';
|
||||
};
|
||||
in
|
||||
# "Keep in mind that you need to use the same version of playwright in your node playwright project as in your nixpkgs, or else playwright will try to use browsers versions that aren't installed!"
|
||||
# - https://nixos.wiki/wiki/Playwright
|
||||
assert pkgs.lib.assertMsg
|
||||
(
|
||||
(pkgs.lib.importJSON ./site/package.json).devDependencies."@playwright/test"
|
||||
== pkgs.playwright-driver.version
|
||||
)
|
||||
"There is a mismatch between the playwright versions in the ./nix.flake and the ./site/package.json file. Please make sure that they use the exact same version.";
|
||||
rec {
|
||||
inherit formatter;
|
||||
|
||||
@@ -261,12 +270,13 @@
|
||||
|
||||
uname = "coder";
|
||||
homeDirectory = "/home/${uname}";
|
||||
releaseName = version;
|
||||
|
||||
drv = devShells.default.overrideAttrs (oldAttrs: {
|
||||
buildInputs =
|
||||
(with pkgs; [
|
||||
coreutils
|
||||
nix
|
||||
nix.out
|
||||
curl.bin # Ensure the actual curl binary is included in the PATH
|
||||
glibc.bin # Ensure the glibc binaries are included in the PATH
|
||||
jq.bin
|
||||
|
||||
Reference in New Issue
Block a user