# cultguard-chromium

> **Deprecated:** use `cultguard-chrome` as the canonical CultGuard browser repo.
> This repository remains as a slim browser-only snapshot/reference and should
> not be the primary source for new browser, stealth, GPU, or DRM work.

Standalone flake repo for the patched Chromium build that powers CultGuard browsers.

## Current scope

Active supported surfaces:

- the Chromium overlay and patch set
- the patched browser package outputs
- lightweight local checks for the patched browser derivation

Remote-builder and shared `sccache` workflows are retired for now. Historical
files may still exist in the repo, but they are not exposed through active flake
outputs or `devenv` tasks.

## Flake outputs

- `packages.x86_64-linux.browser`
- `packages.x86_64-linux."chromium-cultguard"`
- `packages.x86_64-linux.default`
- `overlays.default`
- `lib.mkCultguardChromeOverlay`
- `checks.x86_64-linux.patch-files`
- `checks.x86_64-linux.browser-drv`
- `checks.x86_64-linux.chromium-drv`

`packages.x86_64-linux.browser` is the stable downstream-consumer alias for the
patched browser package. It resolves to the same derivation as
`packages.x86_64-linux."chromium-cultguard"`.

The default browser build is sandbox-safe and does not require local shared
`sccache` or any remote builder.

## Downstream flake consumption

```nix
{
  inputs.cultguard-chromium.url = "git+https://github.com/cultscale/cultguard-chromium.git";

  outputs = { self, nixpkgs, cultguard-chromium, ... }:
    let
      system = "x86_64-linux";
    in {
      packages.${system}.cultguard-browser =
        cultguard-chromium.packages.${system}.browser;
    };
}
```

## Local build

Build the patched browser directly:

```bash
nix build .#chromium-cultguard \
  --max-jobs 1 \
  --cores 8 \
  -L
```

Resolve the resulting store path:

```bash
nix path-info .#chromium-cultguard
```

## Local checks

Evaluate the flake without building checks:

```bash
nix flake check --no-build
```

Build the lightweight local checks:

```bash
nix build --no-link \
  .#checks.x86_64-linux.patch-files \
  .#checks.x86_64-linux.browser-drv \
  .#checks.x86_64-linux.chromium-drv
```

## `devenv` helper shell

Enter the repo shell:

```bash
nix shell nixpkgs#devenv -c devenv shell
```

Useful tasks:

```bash
devenv tasks list
devenv tasks run check
devenv tasks run build:browser
```

## Notes

- The active patch set applies `chrome-branding.patch` and `cdp-stealth.patch`.
- `gpu-profile.patch` is retained in-repo, but is not currently applied by the
  active browser overlay.
- If remote-builder or `sccache` workflows are needed again later, restore them
  from git history instead of relying on the retired paths in current docs.
