mirror of
https://github.com/nmasur/dotfiles
synced 2026-11-22 12:09:14 +00:00
mathesar: work around broken clevercsv (chardet 6) in nixpkgs
This commit is contained in:
1 parent
d5ffcb0a82
commit
65c00a79a9
2 files changed
+26
-1
No files matched your search
@@ -367,3 +367,12 @@
|
|||||||
`volnoti` service, but this preset still installed the package system-wide,
|
`volnoti` service, but this preset still installed the package system-wide,
|
||||||
so `gtk2` was still being evaluated (via `man-paths`) and the flake.lock
|
so `gtk2` was still being evaluated (via `man-paths`) and the flake.lock
|
||||||
update check kept failing on `nixosConfigurations.staff`.
|
update check kept failing on `nixosConfigurations.staff`.
|
||||||
|
- Worked around nixpkgs marking `clevercsv` as broken (it requires
|
||||||
|
`chardet < 6`, unstable ships 6.x), which failed the flake check via
|
||||||
|
`mathesar` (`pkgs/mathesar/package.nix`). Pinning `clevercsv` itself from
|
||||||
|
`nixpkgs-stable` does not work (nixpkgs rejects mixing Python derivations
|
||||||
|
built from different package sets), so `clevercsv` in mathesar's Python set
|
||||||
|
is now built against a local `chardet` 5.2.0 instead. The override is scoped
|
||||||
|
to `clevercsv`: replacing `chardet` for the whole set changes `django`'s
|
||||||
|
inputs and puts two `django`s in the env. Remove once clevercsv supports
|
||||||
|
chardet 6.
|
||||||
@@ -79,6 +79,18 @@ let
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
chardet5 = python313Packages.buildPythonPackage rec {
|
||||||
|
pname = "chardet";
|
||||||
|
version = "5.2.0";
|
||||||
|
pyproject = true;
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
hash = "sha256-Gztv9HmoxBS8P6LAhSmVaVxKAm3NbQYzst0JLKOcHPc=";
|
||||||
|
};
|
||||||
|
build-system = [ python313Packages.setuptools ];
|
||||||
|
doCheck = false;
|
||||||
|
};
|
||||||
|
|
||||||
pythonPkg = python313.override {
|
pythonPkg = python313.override {
|
||||||
self = python313;
|
self = python313;
|
||||||
packageOverrides = pyfinal: pyprev: {
|
packageOverrides = pyfinal: pyprev: {
|
||||||
@@ -92,7 +104,11 @@ let
|
|||||||
# clevercsv's test_encoding_chardet is nondeterministic (chardet
|
# clevercsv's test_encoding_chardet is nondeterministic (chardet
|
||||||
# returns None instead of ISO-8859-1/KOI8-R on some platforms),
|
# returns None instead of ISO-8859-1/KOI8-R on some platforms),
|
||||||
# breaking the build. Skip its test suite.
|
# breaking the build. Skip its test suite.
|
||||||
clevercsv = pyprev.clevercsv.overridePythonAttrs (_old: {
|
# nixpkgs marks clevercsv as broken with chardet >= 6, so build it
|
||||||
|
# against chardet 5 (scoped to clevercsv: overriding chardet for the
|
||||||
|
# whole set changes django's inputs and duplicates it in the env).
|
||||||
|
# Drop once clevercsv supports chardet 6.
|
||||||
|
clevercsv = (pyprev.clevercsv.override { chardet = chardet5; }).overridePythonAttrs (_old: {
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
doInstallCheck = false;
|
doInstallCheck = false;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user