Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / web / playwright-test / wrapped.nix
blob1557b80765f72d2400387f8b15c9d25f9cd7a3f7
1 { lib
2 , callPackage
3 , buildNpmPackage
4 , fetchurl
5 , python3
6 , playwright-driver
7 , makeWrapper
8 }:
9 let
10   driver = playwright-driver;
11   browsers = playwright-driver.browsers;
14   # nodeDependencies / package / shell
15   playwright-test-raw = (callPackage ./default.nix { })."@playwright/test-${driver.version}";
17   playwright-test = playwright-test-raw.overrideAttrs (oa: {
18     nativeBuildInputs = oa.nativeBuildInputs or [ ] ++ [
19       makeWrapper
20     ];
21     postInstall = ''
22       # you need to set both the path and version else playwright looks into the wrong one
23       wrapProgram $out/bin/playwright \
24           --set-default PLAYWRIGHT_BROWSERS_PATH "${browsers}" \
25           --prefix NODE_PATH : ${placeholder "out"}/lib/node_modules
26     '';
27   });
29   playwright-test