Files
google-cookie-retrieval/flake.nix
bert c11ff9d3c6 Fix rbw vault lock detection by using system rbw
The nix-bundled rbw (1.13.2) had a protocol mismatch with newer system
rbw-agent versions. The agent sends environment variables as byte arrays,
but rbw 1.13.2 expects base64-encoded strings, causing:

  rbw unlocked: failed to parse message '...': invalid type: sequence,
  expected base64 encoded os string

By not bundling rbw in the nix package, the script uses the system rbw
which matches the running rbw-agent and can communicate correctly.

Fixes gcr-tth
2026-01-19 10:16:18 -08:00

49 lines
1.3 KiB
Nix

{
description = "Development shell + app for google-cookie-retrieval";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/release-25.05";
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
src = ./.;
inputs = [
pkgs.python3
pkgs.python3Packages.selenium
pkgs.chromedriver
pkgs.chromium
# Note: rbw intentionally NOT included - must use system rbw to match running rbw-agent
pkgs.wl-clipboard
pkgs.xclip
];
in {
devShells.${system}.default = pkgs.mkShell {
buildInputs = inputs;
shellHook = ''
echo "Development shell with Python, Selenium, and Chromedriver loaded."
'';
};
packages.${system}.default = pkgs.python3Packages.buildPythonApplication {
pname = "google-cookie-retrieval";
version = "0.1.0";
src = self;
propagatedBuildInputs = inputs;
pyproject = false;
installPhase = ''
mkdir -p $out/bin
cp selenium_cookie_extractor_json.py $out/bin/google-cookie-retrieval
chmod +x $out/bin/google-cookie-retrieval
'';
};
apps.${system}.default = {
type = "app";
program = "${self.packages.${system}.default}/bin/google-cookie-retrieval";
};
};
}