Skip to content

Lightpanda: the headless browser designed for AI and automation

add nix run for generate-v8-deps

Muki Kiboigode4657c873f8
diff --git a/flake.nix b/flake.nix
index cea8dd2e0..edcae5fb8 100644
--- a/flake.nix
+++ b/flake.nix
@@ -112,6 +112,27 @@
inherit lightpanda;
default = lightpanda;
};
+
+ apps = {
+ generate-v8-deps = {
+ type = "app";
+ program = "${pkgs.writeShellScript "generate-v8-deps" ''
+ export PATH="${
+ pkgs.lib.makeBinPath [
+ pkgs.curl
+ pkgs.gnused
+ pkgs.coreutils
+ pkgs.gawk
+ pkgs.nix
+ ]
+ }:$PATH"
+ export SSL_CERT_FILE="${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
+ exec bash ${./nix/update-v8-deps.sh} "$PWD"
+ ''}";
+ };
+
+ };
+
}
);
}
diff --git a/nix/update-v8-deps.sh b/nix/update-v8-deps.sh
index 434a9f0f7..1b0c699a6 100755
--- a/nix/update-v8-deps.sh
+++ b/nix/update-v8-deps.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
-cd "$(dirname "${BASH_SOURCE[0]}")/.."
+cd "${1:-"$(dirname "${BASH_SOURCE[0]}")/.."}"
ACTION=.github/actions/install/action.yml
OUT=nix/v8-deps.nix