about summary refs log tree commit diff
path: root/pkgs/by-name/pr
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2024-03-21 15:05:45 +0100
committerMartin Weinelt <hexa@darmstadt.ccc.de>2024-03-21 15:08:30 +0100
commit3f35c474b8a584b88eae9098fa758a5162dc3390 (patch)
tree86506cca91a9c224a1988da4b7928e43af2cb563 /pkgs/by-name/pr
parent56d2a7d868a516caf2948659f617bc4d10ff2381 (diff)
pretix: compile all languages at build time
Pretix wants to build locales according to the user configuration, which
does not exist in our case and leads to certain languages not being
built.

As our packages are immutable, the user config will never be able to
influence them and we therefore must enable all languages at build time.

Closes: #297708
Diffstat (limited to 'pkgs/by-name/pr')
-rw-r--r--pkgs/by-name/pr/pretix/language-build.patch12
-rw-r--r--pkgs/by-name/pr/pretix/package.nix4
2 files changed, 16 insertions, 0 deletions
diff --git a/pkgs/by-name/pr/pretix/language-build.patch b/pkgs/by-name/pr/pretix/language-build.patch
new file mode 100644
index 0000000000000..b4043b95446d6
--- /dev/null
+++ b/pkgs/by-name/pr/pretix/language-build.patch
@@ -0,0 +1,12 @@
+diff --git a/src/pretix/_build_settings.py b/src/pretix/_build_settings.py
+index d1ea73b84..9e13cdc87 100644
+--- a/src/pretix/_build_settings.py
++++ b/src/pretix/_build_settings.py
+@@ -49,6 +49,7 @@ HAS_MEMCACHED = False
+ HAS_CELERY = False
+ HAS_GEOIP = False
+ SENTRY_ENABLED = False
++LANGUAGES = ALL_LANGUAGES
+ 
+ for entry_point in entry_points(group='pretix.plugin'):
+     INSTALLED_APPS.append(entry_point.module) # noqa: F405
diff --git a/pkgs/by-name/pr/pretix/package.nix b/pkgs/by-name/pr/pretix/package.nix
index dc7fc925f1f53..4527db606e881 100644
--- a/pkgs/by-name/pr/pretix/package.nix
+++ b/pkgs/by-name/pr/pretix/package.nix
@@ -67,6 +67,10 @@ python.pkgs.buildPythonApplication rec {
     # INSTALLED_APPS, so that their static files are collected.
     ./plugin-build.patch
 
+    # Configure django-statici18n to compile all available languages at
+    # build time.
+    ./language-build.patch
+
     (fetchpatch2 {
       # Allow customization of cache and log directory
       # https://github.com/pretix/pretix/pull/3997