11 python = python3.override {
13 packageOverrides = final: prev: {
14 django-bootstrap4 = prev.django-bootstrap4.overridePythonAttrs (oldAttrs: rec {
16 src = oldAttrs.src.override {
18 hash = "sha256-a8BopUwZjmvxOzBVqs4fTo0SY8sEEloGUw90daYWfz8=";
21 propagatedBuildInputs = with final; [
26 # fails with some assertions
34 src = fetchFromGitHub {
38 hash = "sha256-D0ju9aOVy/new9GWqyFalZYCisdmM7irWSbn2TVCJYQ=";
42 description = "Conference planning tool: CfP, scheduling, speaker management";
43 mainProgram = "pretalx-manage";
44 homepage = "https://github.com/pretalx/pretalx";
45 changelog = "https://docs.pretalx.org/en/latest/changelog.html";
46 license = licenses.asl20;
47 maintainers = with maintainers; [ hexa] ++ teams.c3d2.members;
48 platforms = platforms.linux;
51 frontend = buildNpmPackage {
52 pname = "pretalx-frontend";
55 sourceRoot = "${src.name}/src/pretalx/frontend/schedule-editor";
57 npmDepsHash = "sha256-EAdeXdcC3gHun6BOHzvqpzv9+oDl1b/VTeNkYLiD+hA=";
59 npmBuildScript = "build";
64 python.pkgs.buildPythonApplication rec {
75 substituteInPlace src/pretalx/common/management/commands/rebuild.py \
76 --replace 'subprocess.check_call(["npm", "run", "build"], cwd=frontend_dir, env=env)' ""
83 build-system = with python.pkgs; [
107 dependencies = with python.pkgs; [
119 django-context-decorator
123 django-formset-js-improved
144 ++ beautifulsoup4.optional-dependencies.lxml
145 ++ django.optional-dependencies.argon2
148 optional-dependencies = {
149 mysql = with python.pkgs; [
152 postgres = with python.pkgs; [
155 redis = with python.pkgs; [
161 rm -r ./src/pretalx/frontend/schedule-editor
162 ln -s ${frontend}/lib/node_modules/@pretalx/schedule-editor ./src/pretalx/frontend/schedule-editor
164 # Generate all static files, see https://docs.pretalx.org/administrator/commands.html#python-m-pretalx-rebuild
165 PYTHONPATH=$PYTHONPATH:./src python -m pretalx rebuild
170 cp ./src/manage.py $out/bin/pretalx-manage
172 # The processed source files are in the static output, except for fonts, which are duplicated.
173 # See <https://github.com/pretalx/pretalx/issues/1585> for more details.
174 find $out/${python.sitePackages}/pretalx/static \
176 -not -path "$out/${python.sitePackages}/pretalx/static/fonts*" \
179 # Copy generated static files into dedicated output
181 cp -r ./src/static.dist/** $static/
183 # Copy frontend files
184 ln -s ${frontend}/lib/node_modules/@pretalx/schedule-editor/dist/* $static
188 export PRETALX_CONFIG_FILE="$src/src/tests/ci_sqlite.cfg"
192 nativeCheckInputs = with python.pkgs; [
202 ] ++ lib.flatten (lib.attrValues optional-dependencies);
205 # tries to run npm run i18n:extract
206 "test_common_custom_makemessages_does_not_blow_up"
207 # Expected to perform X queries or less but Y were done
208 "test_can_see_schedule"
209 "test_schedule_export_public"
210 "test_schedule_frab_json_export"
211 "test_schedule_frab_xcal_export"
212 "test_schedule_frab_xml_export"
213 "test_schedule_frab_xml_export_control_char"
214 "test_schedule_page_text_list"
215 "test_schedule_page_text_table"
216 "test_schedule_page_text_wrong_format"
217 "test_versioned_schedule_page"
223 inherit (nixosTests) pretalx;
225 plugins = lib.recurseIntoAttrs (
226 lib.packagesFromDirectoryRecursive {
227 inherit (python.pkgs) callPackage;
228 directory = ./plugins;