Conversation
Currently the flake installs only core deps, so `nix run` gives a
working TUI but every DB driver except SQLite (stdlib) is missing —
users can't connect to Postgres/MySQL/etc. On a Nix install there's
no pipx-style inject, so the driver has to come from the derivation.
Add a small `makeSqlit` helper with an `extras` list that mirrors the
names in pyproject.toml's `project.optional-dependencies`, limited to
drivers packaged in nixpkgs. The default `sqlit` is unchanged; a new
`sqlit-full` variant pulls in every extra we can satisfy from nixpkgs.
Custom builds go through `lib.makeSqlit { extras = [ ... ]; }`.
Addresses the goal of #126 without the 22-flag / 500-line expansion.
Main currently ships a flake with zero DB drivers — SQLite works via
stdlib but nothing else does, and Nix users can't add drivers
post-install. Drop the no-driver default; the out-of-box derivation
now pulls in every extra nixpkgs can satisfy (ssh, postgres,
cockroachdb, mysql, duckdb, bigquery, snowflake, d1). Custom builds
still go through lib.makeSqlit { extras = [ ... ]; }.
Closes the gap reported in #126 and #154.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #126 and fixes #154. Current
flake.nixon main ships zero DB drivers — a Nix install only works for SQLite files, because there's no pipx-style post-install inject on Nix. Two separate users have reported this (#126, #154).This:
makeSqlithelper with anextraslist that mirrors the names inpyproject.toml'sproject.optional-dependencies, limited to drivers nixpkgs actually packages.sqlitnow pulls in every such extra (ssh, postgres, cockroachdb, mysql, duckdb, bigquery, snowflake, d1) sonix runworks out of the box.lib.makeSqlitso custom flakes can opt into a different subset:makeSqlit { extras = [ "postgres" ]; }.I don't have Nix locally — would appreciate a
nix flake checkon a Nix host before merging.