13 python = python3.override {
15 packageOverrides = self: super: {
16 bleach = super.bleach.overridePythonAttrs (oldAttrs: rec {
22 hash = "sha256-DQMlXEfrm9Lyaqm7fyEHcy5+j+GVyi9kcJ/POwpKCFw=";
26 django = super.django_4;
28 django-oauth-toolkit = super.django-oauth-toolkit.overridePythonAttrs (oldAttrs: {
30 src = fetchFromGitHub {
31 inherit (oldAttrs.src) owner repo;
32 rev = "refs/tags/v${version}";
33 hash = "sha256-oGg5MD9p4PSUVkt5pGLwjAF4SHHf4Aqr+/3FsuFaybY=";
37 stripe = super.stripe.overridePythonAttrs rec {
43 hash = "sha256-hOXkMINaSwzU/SpXzjhTJp0ds0OREc2mtu11LjSc9KE=";
47 pretix-plugin-build = self.callPackage ./plugin-build.nix { };
49 sentry-sdk = super.sentry-sdk_2;
56 src = fetchFromGitHub {
59 rev = "refs/tags/v${version}";
60 hash = "sha256-L6mTfLIx8kD/5s0Dfp24TEATmjxBXERQjynB0szH3DM=";
63 npmDeps = buildNpmPackage {
64 pname = "pretix-node-modules";
67 sourceRoot = "${src.name}/src/pretix/static/npm_dir";
68 npmDepsHash = "sha256-zUui5tYINTDKA91WgRV51ilIPFBJpZ+S2fJwW85KJ9k=";
76 cp -R node_modules $out/
82 python.pkgs.buildPythonApplication rec {
83 inherit pname version src;
87 # Discover pretix.plugin entrypoints during build and add them into
88 # INSTALLED_APPS, so that their static files are collected.
93 "django-phonenumber-field"
106 "vat-moss-forked" # we provide a patched vat-moss package
110 NODE_PREFIX=src/pretix/static.dist/node_prefix
111 mkdir -p $NODE_PREFIX
112 cp -R ${npmDeps}/node_modules $NODE_PREFIX/
113 chmod -R u+w $NODE_PREFIX/
116 sed -i "/setuptools-rust/d" pyproject.toml
118 substituteInPlace pyproject.toml \
119 --replace-fail '"backend"' '"setuptools.build_meta"' \
120 --replace-fail 'backend-path = ["_build"]' ""
123 build-system = with python.pkgs; [
130 dependencies = with python.pkgs; [
145 django-formset-js-improved
155 django-phonenumber-field
175 paypal-checkout-serversdk
189 pytz-deprecation-shim
208 ++ django.optional-dependencies.argon2
211 optional-dependencies = with python.pkgs; {
219 cp ./src/manage.py $out/bin/pretix-manage
222 rm -rfv $out/${python.sitePackages}/pretix/static.dist/node_prefix
225 dontStrip = true; # no binaries
227 nativeCheckInputs = with python.pkgs; [
237 ] ++ lib.flatten (lib.attrValues optional-dependencies);
244 # unreliable around day changes
245 "test_order_create_invoice"
247 # outdated translation files
248 # https://github.com/pretix/pretix/commit/c4db2a48b6ac81763fa67475d8182aee41c31376
249 "test_different_dates_spanish"
250 "test_same_day_spanish"
251 "test_same_month_spanish"
252 "test_same_year_spanish"
256 export PYTHONPATH=$(pwd)/src:$PYTHONPATH
257 export DJANGO_SETTINGS_MODULE=tests.settings
265 plugins = lib.recurseIntoAttrs
266 (python.pkgs.callPackage ./plugins {
267 inherit (python.pkgs) callPackage;
271 inherit (nixosTests) pretix;
276 description = "Ticketing software that cares about your event—all the way";
277 homepage = "https://github.com/pretix/pretix";
278 license = with licenses; [
280 # 3rd party components below src/pretix/static
286 # all other files below src/pretix/static and src/pretix/locale and aux scripts
289 maintainers = with maintainers; [ hexa ];
290 mainProgram = "pretix-manage";
291 platforms = platforms.linux;