nixos: apply nixpkgs PR 490230 (playwright-cli)

This commit is contained in:
2026-02-13 14:10:59 -08:00
committed by Kat Huang
parent eae2c76aa2
commit 485b618bc5
3 changed files with 7 additions and 29 deletions

View File

@@ -5,7 +5,7 @@ description: Automate browser interactions from the shell using Playwright via t
# Browser Automation With playwright-cli
This system provides `playwright-cli` via Nix (see `nixos/overlay.nix` and `nixos/code.nix`), so its available on `PATH` without any `npm -g` installs.
This system provides `playwright-cli` via Nix (see `nixos/flake.nix` for the nixpkgs PR patch and `nixos/code.nix` for installation), so its available on `PATH` without any `npm -g` installs.
## Quick Start

View File

@@ -219,6 +219,11 @@
}: let
# Nixpkgs PR patches - just specify PR number and hash
nixpkgsPRPatches = [
# playwright-cli
{
pr = 490230;
hash = "sha256-FGTQuqTDJV7GXsHDNOMyNBD2ZUBNJa//FBoCPEQHdLA=";
}
# claude-code
# {
# pr = 464698;
@@ -342,6 +347,7 @@
patches = map bootstrapPkgs.fetchpatch allNixpkgsPatches;
prePatch = ''
mkdir -p pkgs/by-name/an/antigravity
mkdir -p pkgs/by-name/pl/playwright-cli
'';
};
# Get eval-config from patched source

View File

@@ -264,34 +264,6 @@ 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: {