nixos: add playwright-cli

This commit is contained in:
2026-02-13 13:18:25 -08:00
committed by Kat Huang
parent 27c6b2af3c
commit c509071ff9
4 changed files with 81 additions and 0 deletions

View File

@@ -264,6 +264,34 @@ in
in
final.python3.withPackages my-python-packages;
playwright-cli = final.buildNpmPackage rec {
pname = "playwright-cli";
version = "0.1.0";
src = final.fetchFromGitHub {
owner = "microsoft";
repo = "playwright-cli";
rev = "v${version}";
hash = "sha256-9LuLQ2klYz91rEkxNDwcx0lYgE6GPoTJkwgxI/4EHgg=";
};
# Hash of dependencies produced from package-lock.json (lockfileVersion = 3).
# To recompute:
# nix build nixpkgs#prefetch-npm-deps -o /tmp/prefetch-npm-deps
# /tmp/prefetch-npm-deps/bin/prefetch-npm-deps package-lock.json
npmDepsHash = "sha256-DvorQ40CCNQJNQdTPFyMBErFNicSWkNT/e6S8cfZlRA=";
# No build step; the published CLI is just a Node entrypoint + deps.
dontNpmBuild = true;
meta = with final.lib; {
description = "Playwright CLI (playwright-cli) for browser automation and Playwright MCP terminal commands";
homepage = "https://github.com/microsoft/playwright-cli";
license = licenses.asl20;
mainProgram = "playwright-cli";
};
};
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
(
python-final: python-prev: {