overlays: add frappix fixups for nixos-unstable (sql_metadata, rq_1)
Building the frappix hosts on nixos-unstable 3ec6363 fails in frappix's python overlay: - sql_metadata 2.12.0 pins sqlparse<0.6, nixpkgs ships 0.6.0. frappe itself needs 0.6 (MAX_GROUPING_TOKENS), and sql_metadata 3.x needs sqlglot >= 30 which nixpkgs lacks, so relax the pin. frappe only feeds it SELECT statements; the only regressions on 0.6 are CREATE TABLE IF NOT EXISTS name extraction. - rq 1.16.2 test_parse_connection fails against redis-py 8.1 (extra himport_registry kwarg). Test-only; disable it. nix flake check does not catch these: it only evaluates hosts.
This commit is contained in:
1 parent
466dcba07c
commit
ac2b1873b9
2 files changed
+36
No files matched your search
@@ -0,0 +1,34 @@
|
||||
# Fixups for frappix's python overlay on current nixos-unstable. Everything
|
||||
# here belongs upstream in kurogeek/frappix; drop entries as they land.
|
||||
# Must be applied after frappixPythonOverlay.
|
||||
_final: prev:
|
||||
let
|
||||
inherit (prev) lib;
|
||||
in
|
||||
{
|
||||
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
||||
(_pyFinal: pyPrev: {
|
||||
# frappe >= v15.120 needs sqlparse 0.6 (db_query.py touches
|
||||
# sqlparse.engine.grouping.MAX_GROUPING_TOKENS), but every sql_metadata
|
||||
# 2.x release pins sqlparse<0.6; the sqlglot-based 3.x needs sqlglot >= 30,
|
||||
# which nixpkgs does not ship yet. Relaxing the pin is safe for frappe: its
|
||||
# two call sites (desk/reportview.py, core/doctype/recorder/db_optimizer.py)
|
||||
# only parse SELECT statements, and the only sql_metadata test regressions
|
||||
# on sqlparse 0.6 are `CREATE TABLE IF NOT EXISTS` name extraction (2/150).
|
||||
sql_metadata =
|
||||
if lib.versionAtLeast pyPrev.sql_metadata.version "3" then
|
||||
lib.warn "frappix ships sql_metadata ${pyPrev.sql_metadata.version} (no sqlparse dependency): drop the sql_metadata entry from overlays/frappix-fixups.nix" pyPrev.sql_metadata
|
||||
else
|
||||
pyPrev.sql_metadata.overridePythonAttrs (old: {
|
||||
pythonRelaxDeps = (old.pythonRelaxDeps or [ ]) ++ [ "sqlparse" ];
|
||||
});
|
||||
|
||||
# rq 1.16.2 (frappix's rq_1 pin): test_parse_connection compares redis
|
||||
# connection kwargs against a literal; redis-py 8.1 (current nixpkgs) adds
|
||||
# `himport_registry`, so the assertion fails. Test-only.
|
||||
rq_1 = pyPrev.rq_1.overridePythonAttrs (old: {
|
||||
disabledTests = old.disabledTests ++ [ "test_parse_connection" ];
|
||||
});
|
||||
})
|
||||
];
|
||||
}
|
||||
Reference in new issue
Block a user