chore: allow skipping host requirements validation #5806
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
The
playwright
library 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_PATH
env variable. That means nix cares about the browsers' dependencies on its own. Hence, it doesn't make sense to validate host requirements on theplaywright
library 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_REQUIREMENTS
env variable.Use case
In
shell.nix
and then