Skip to content

chore(nix): remove the self-hosted flake package#262

Merged
AprilNEA merged 1 commit into
masterfrom
chore/drop-nix-flake
Jun 15, 2026
Merged

chore(nix): remove the self-hosted flake package#262
AprilNEA merged 1 commit into
masterfrom
chore/drop-nix-flake

Conversation

@AprilNEA

Copy link
Copy Markdown
Owner

Removes OpenLogi's self-hosted Nix flake package (flake.nix, flake.lock, nix/package.nix).

Why

OpenLogi is already packaged in nixpkgs (NixOS/nixpkgs#527640) and distributed via homebrew-cask, so the repo's own flake adds no distribution path those two don't already cover — while it carried a recurring maintenance cost.

The package's single cargoHash had to be re-bumped on every Cargo.lock change: a dependency bump, a gpui pin bump, and every release version bump. The version-bump case is not obvious, so to be precise about the mechanism: rustPlatform.fetchCargoVendor copies Cargo.lock into the vendored fixed-output derivation (pkgs/build-support/rust/fetch-cargo-vendor-util.py), and Cargo.lock embeds the version of all 10 local openlogi* workspace crates. A release rewrites those 10 lines → the vendored content changes → the recursive NAR cargoHash changes.

With no Nix CI guard in place, that churn left the flake silently broken on master: the committed hash is for the 0.4.0-era lock, but the tree is at 0.6.13.

Why not the alternatives

  • chore(nix): bump cargo hash and version #162 (cargoDepsName = pname) does not fix the churn. cargoDepsName only sets the deps derivation's name, which changes its store path — not the recursive NAR output hash that cargoHash verifies. The vendored Cargo.lock (with the bumped local versions) is unchanged in scope, so a version bump still invalidates the hash. (Verified against the pinned nixpkgs rev 4df1b88: build-rust-package/default.nix wires cargoDepsName only to name; fetch-cargo-vendor.nix sets outputHashMode = "recursive".)
  • ci: split out Nix CI; rename CI workflow to Rust CI #114 (fail-closed Nix CI) would catch the drift automatically, but doesn't remove the per-release hash maintenance. Dropping the flake removes the churn at the root.

Scope / safety

  • Removes flake.nix, flake.lock, nix/package.nix only.
  • The devenv dev shell (.envrc / devenv.nix / devenv.yaml) is independent of the flake and is unaffected — nix build was the flake's only output; use devenv provides the shell.
  • No workflow, README, or doc references the flake (only a historical CHANGELOG entry, left intact).

Revives #133; supersedes #114 and #162.

OpenLogi is packaged in nixpkgs (NixOS/nixpkgs#527640) and distributed via
homebrew-cask, so the repo's own flake adds no distribution path those don't
already cover. Its single cargoHash had to be re-bumped on every Cargo.lock
change -- dep bump, gpui pin bump, and (because fetchCargoVendor copies
Cargo.lock into the vendored FOD, and Cargo.lock embeds the 10 local
openlogi* crate versions) every release version bump. That recurring churn
left the flake silently broken on master (the committed hash is for the
0.4.0-era lock; the tree is at 0.6.13).

cargoDepsName = pname (proposed in #162) does not fix this: it only renames
the deps derivation, which changes its store path, not the recursive NAR
output hash the cargoHash verifies -- so a version bump still invalidates it.
A fail-closed Nix CI guard (#114) would catch the drift but not remove the
per-release maintenance. Dropping the flake removes the churn entirely.

Removes flake.nix, flake.lock, and nix/package.nix. The devenv dev shell
(.envrc / devenv.nix / devenv.yaml) is independent and unaffected.

Revives #133; supersedes #114 and #162.
@greptile-apps

greptile-apps Bot commented Jun 15, 2026

Copy link
Copy Markdown

Greptile Summary

Removes the repo's self-hosted Nix flake (flake.nix, flake.lock, nix/package.nix) since OpenLogi is already distributed via nixpkgs and homebrew-cask, and the flake's cargoHash had drifted silently (pinned to v0.4.0 while the tree is at v0.6.13).

  • flake.nix and flake.lock deleted — no CI steps, README sections, or doc pages reference them; only a historical CHANGELOG entry remains, intentionally left intact.
  • nix/package.nix deleted — the stale Rust derivation is removed at the root, eliminating the per-release cargoHash re-bump burden.
  • The devenv dev shell (devenv.nix, .envrc, devenv.yaml) is independent and unaffected.

Confidence Score: 5/5

Safe to merge — only deletes three files with no downstream references in CI, docs, or workflows.

All three deleted files are self-contained: no CI job invokes nix build, no README or doc page links to the flake, and the devenv dev shell is a completely separate mechanism that remains untouched. The committed cargoHash was already stale (v0.4.0 vs. the current v0.6.13 tree), so removing these files improves correctness rather than regressing it.

No files require special attention.

Important Files Changed

Filename Overview
flake.nix Deleted — flake entry point that exposed the nix build package; no remaining references in CI or docs.
flake.lock Deleted — lock file pinning nixpkgs-unstable; no longer needed without the flake.
nix/package.nix Deleted — Rust build derivation (stale at v0.4.0 cargoHash while tree is at v0.6.13); removing eliminates recurring hash churn.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[OpenLogi distribution] --> B[nixpkgs\nNixOS/nixpkgs#527640]
    A --> C[homebrew-cask]
    A -.->|removed by this PR| D["Repo flake\n(flake.nix / nix/package.nix)"]
    E[Dev shell] --> F["devenv.nix\n(.envrc / devenv.yaml)\nunaffected"]

    style D stroke-dasharray: 5 5,fill:#ffcccc
    style B fill:#ccffcc
    style C fill:#ccffcc
Loading

Reviews (1): Last reviewed commit: "chore(nix): remove the self-hosted flake..." | Re-trigger Greptile

@AprilNEA AprilNEA merged commit 8c5ac3a into master Jun 15, 2026
8 checks passed
@AprilNEA AprilNEA deleted the chore/drop-nix-flake branch June 15, 2026 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant