weblate: Fix compilation and module test (#565943)

This commit is contained in:
Kerstin Humm
2026-09-24 12:11:39 +00:00
committed by GitHub
2 changed files with 24 additions and 2 deletions

View File

@@ -26,8 +26,12 @@ let
# Use a settings module in dataDir, to avoid having to rebuild the package
# when user changes settings.
makeWrapperArgs = (old.makeWrapperArgs or [ ]) ++ [
"--set PYTHONPATH \"${settingsDir}\""
"--set DJANGO_SETTINGS_MODULE \"settings\""
"--set"
"PYTHONPATH"
settingsDir
"--set"
"DJANGO_SETTINGS_MODULE"
"settings"
];
})
);

View File

@@ -10,6 +10,7 @@
redisTestHook,
fontconfig,
nixosTests,
fetchpatch,
# runtime inputs
gitSVN,
@@ -62,6 +63,20 @@ python3Packages.buildPythonApplication (finalAttrs: {
'_cmd: ClassVar[str] = "${lib.getExe gitSVN}"'
'';
patches = [
(fetchpatch {
name = "typing_improvement"; # a prerequisite for the fix_migration patch
url = "https://github.com/WeblateOrg/weblate/commit/df5aa0fd19287feb035eaf02323c72bcce92d1ad.patch";
hash = "sha256-oOxCD5/g2XPwXtOKHHiiKV9caITxfoiWTzolwgwZobc=";
})
(fetchpatch {
name = "fix_migration"; # should be included in post-2026.9.1 release
url = "https://github.com/WeblateOrg/weblate/commit/7c4235779f89a421c7c6c24ee5bbbaa4f0ab50f1.patch";
excludes = [ "docs/changes.rst" ]; # incompatible change
hash = "sha256-V8HyeBALZ8HaXHmhC8PK8ktB4osf9za+FH7dFLI3xis=";
})
];
build-system = with python3Packages; [ setuptools ];
nativeBuildInputs = [ gettext ];
@@ -343,6 +358,9 @@ python3Packages.buildPythonApplication (finalAttrs: {
# djangosaml2idp2 is not packaged yet
"weblate/utils/tests/test_djangosaml2idp.py"
# Some issue related to presumably misconfigured data directory. See #565921 for details.
"weblate/fonts/tests/test_models.py::FontModelTest::test_cleanup"
# Don't understand why
"weblate/trans/tests/test_alert.py::WebsiteAlertSettingTest::test_website_alerts_enabled"
];