Repository navigation
chore: allow skipping host requirements validation - #5806
Pavel Feldman (pavelfeldman) merged 1 commit into
Conversation
|
Hi Pavel Feldman (@pavelfeldman), thank you for such a prompt merge I am trying to find a document regarding the release cycle but no luck so far. Can you please point me in the right direction or maybe you can give me an idea when to expect this git commit to be published to the npm? Many thanks! |
|
The change should be available in 15-16 hours when you install playwright via |
|
I know it's been over a year, but this is the best lead I have, Oleg Lebedev (@olebedev) do you still have that I guess it could just be the browsers' binaries, but I'm trying to figure out if something can be done to avoid version mismatch problems. |
|
Simon Kohlmeyer (@voidus), this is an intellectual property of the company I work for so I can't publish it, but yeah, I still have it. A recommendation I can give is to understand which version of pre-built chromium you use from the playwright project, find a commit of the closest next version within the nixpkgs repo and use that nixpkgs commit to pick up dependencies, also you would want to wrap binary with appropriate PATH/LD_LIBRARY_PATH and patch ELF headers. Hope that helps. |
|
In case anyone comes here later, I've put up a PoC that seems to work for me: https://github.com/voidus/nix-playwright-poc |
Background
The
playwrightlibrary uses patched browsers' binaries that are not working with nix because the host requirements might not be satisfied.A way to make them work with nix is to create a nix derivation that wraps provided binaries within their dependencies and provides them already available by a path to a folder, so it's easy to point to them by using the
PLAYWRIGHT_BROWSERS_PATHenv variable. That means nix cares about the browsers' dependencies on its own. Hence, it doesn't make sense to validate host requirements on theplaywrightlibrary level in this case.However, the library validates host's requirements in such cases, which leads to a failure even when the binaries are fully operational (since they wrapped with nix) but the host requirements defined in the library are not satisfied.
In this PR
This PR adds a condition to allow skipping host requirements validation by providing boolean
PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTSenv variable.Use case
In
shell.nixand then