11 python = python3.override {
13 packageOverrides = final: prev: {
14 django = prev.django_5;
16 django-bootstrap4 = prev.django-bootstrap4.overridePythonAttrs (oldAttrs: rec {
18 src = oldAttrs.src.override {
20 hash = "sha256-a8BopUwZjmvxOzBVqs4fTo0SY8sEEloGUw90daYWfz8=";
23 propagatedBuildInputs = with final; [
28 # fails with some assertions
32 django-extensions = prev.django-extensions.overridePythonAttrs {
33 # Compat issues with Django 5.1
34 # https://github.com/django-extensions/django-extensions/issues/1885
42 src = fetchFromGitHub {
46 hash = "sha256-y3BsNmLh9M5NgDPURCjCGWYci40hYcQtDVqsu2HqPRU=";
50 description = "Conference planning tool: CfP, scheduling, speaker management";
51 mainProgram = "pretalx-manage";
52 homepage = "https://github.com/pretalx/pretalx";
53 changelog = "https://docs.pretalx.org/changelog/#${version}";
54 license = licenses.asl20;
55 maintainers = with maintainers; [ hexa] ++ teams.c3d2.members;
56 platforms = platforms.linux;
59 frontend = buildNpmPackage {
60 pname = "pretalx-frontend";
63 sourceRoot = "${src.name}/src/pretalx/frontend/schedule-editor";
65 npmDepsHash = "sha256-i7awRuR7NxhpxN2IZuI01PsN6FjXht7BxTbB1k039HA=";
67 npmBuildScript = "build";
72 python.pkgs.buildPythonApplication rec {
83 substituteInPlace src/pretalx/common/management/commands/rebuild.py \
84 --replace 'subprocess.check_call(["npm", "run", "build"], cwd=frontend_dir, env=env)' ""
91 build-system = with python.pkgs; [
104 "djangorestframework"
115 dependencies = with python.pkgs; [
127 django-context-decorator
131 django-formset-js-improved
152 ++ beautifulsoup4.optional-dependencies.lxml
153 ++ django.optional-dependencies.argon2
156 optional-dependencies = {
157 postgres = with python.pkgs; [
160 redis = with python.pkgs; [
166 rm -r ./src/pretalx/frontend/schedule-editor
167 ln -s ${frontend}/lib/node_modules/@pretalx/schedule-editor ./src/pretalx/frontend/schedule-editor
169 # Generate all static files, see https://docs.pretalx.org/administrator/commands.html#python-m-pretalx-rebuild
170 PYTHONPATH=$PYTHONPATH:./src python -m pretalx rebuild
175 cp ./src/manage.py $out/bin/pretalx-manage
177 # The processed source files are in the static output, except for fonts, which are duplicated.
178 # See <https://github.com/pretalx/pretalx/issues/1585> for more details.
179 find $out/${python.sitePackages}/pretalx/static \
181 -not -path "$out/${python.sitePackages}/pretalx/static/fonts*" \
184 # Copy generated static files into dedicated output
186 cp -r ./src/static.dist/** $static/
188 # Copy frontend files
189 ln -s ${frontend}/lib/node_modules/@pretalx/schedule-editor/dist/* $static
193 export PRETALX_CONFIG_FILE="$src/src/tests/ci_sqlite.cfg"
197 nativeCheckInputs = with python.pkgs; [
207 ] ++ lib.flatten (lib.attrValues optional-dependencies);
210 # tries to run npm run i18n:extract
211 "test_common_custom_makemessages_does_not_blow_up"
212 # Expected to perform X queries or less but Y were done
213 "test_can_see_schedule"
214 "test_schedule_export_public"
215 "test_schedule_frab_json_export"
216 "test_schedule_frab_xcal_export"
217 "test_schedule_frab_xml_export"
218 "test_schedule_frab_xml_export_control_char"
219 "test_schedule_page_text_list"
220 "test_schedule_page_text_table"
221 "test_schedule_page_text_wrong_format"
222 "test_versioned_schedule_page"
224 "test_can_reset_password_by_email"
230 inherit (nixosTests) pretalx;
232 plugins = lib.recurseIntoAttrs (
233 lib.packagesFromDirectoryRecursive {
234 inherit (python.pkgs) callPackage;
235 directory = ./plugins;