Skip to content

Commit

Permalink
pretix: 2024.11.0 -> 2025.1.0 (NixOS#378701)
Browse files Browse the repository at this point in the history
  • Loading branch information
mweinelt authored Feb 2, 2025
2 parents 75c8548 + 2a6f860 commit 4c1b08b
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 49 deletions.
2 changes: 1 addition & 1 deletion nixos/modules/services/web-apps/pretix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ in
expires 7d;
'';
};
"^~ /media/(cachedfiles|invoices)" = {
"^~ (/media/(cachedfiles|invoices)|/static/(staticfiles.json|CACHE/manifest.json))" = {
extraConfig = ''
deny all;
return 404;
Expand Down
16 changes: 5 additions & 11 deletions pkgs/by-name/pr/pretix/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
buildNpmPackage,
fetchFromGitHub,
fetchPypi,
fetchpatch2,
nodejs,
python3,
gettext,
Expand Down Expand Up @@ -43,21 +42,21 @@ let
};

pname = "pretix";
version = "2024.11.0";
version = "2025.1.0";

src = fetchFromGitHub {
owner = "pretix";
repo = "pretix";
rev = "refs/tags/v${version}";
hash = "sha256-vmk7oW9foXkZdt3XOLJDbPldX2TruJOgd8mmi5tGqNw=";
hash = "sha256-azJFXuoV+9qs5MJQTkc1+ZiJb6UKwEa0Ow0p31CkHqI=";
};

npmDeps = buildNpmPackage {
pname = "pretix-node-modules";
inherit version src;

sourceRoot = "${src.name}/src/pretix/static/npm_dir";
npmDepsHash = "sha256-4PrOrI2cykkuzob+DMeAu/GF5OMCho40G3BjCwVW/tE=";
npmDepsHash = "sha256-oo9fo3MjwKYA8gueJ5otIPawORaVNj/Js3y8ZuCZ4qQ=";

dontBuild = true;

Expand All @@ -79,12 +78,6 @@ python.pkgs.buildPythonApplication rec {
# Discover pretix.plugin entrypoints during build and add them into
# INSTALLED_APPS, so that their static files are collected.
./plugin-build.patch

(fetchpatch2 {
# fix tests after 2025-01-01
url = "https://github.com/pretix/pretix/commit/5a5a551c21461d9ef36337480c9874d65a9fdba9.patch";
hash = "sha256-ZtSVI6nVlJtNrnBZ9ktIqFGtNf+oWtvNsgCWwOUwVug=";
})
];

pythonRelaxDeps = [
Expand Down Expand Up @@ -273,8 +266,9 @@ python.pkgs.buildPythonApplication rec {
python
;
plugins = lib.recurseIntoAttrs (
python.pkgs.callPackage ./plugins {
lib.packagesFromDirectoryRecursive {
inherit (python.pkgs) callPackage;
directory = ./plugins;
}
);
tests = {
Expand Down
18 changes: 0 additions & 18 deletions pkgs/by-name/pr/pretix/plugins/default.nix

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

buildPythonPackage rec {
pname = "pretix-mollie";
version = "2.2.1";
version = "2.2.2";
pyproject = true;

src = fetchFromGitHub {
owner = "pretix";
repo = "pretix-mollie";
tag = "v${version}";
hash = "sha256-utrdFrE4XHDTi/45gUTFarD+PQoGIHc4gTkDR8dGu40=";
hash = "sha256-yc4t+XtHk7u3KcfeS+0CSTrBJ6e6SyLRpaQBHAKYVvo=";
};

build-system = [
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ buildPythonPackage rec {

patches = [
(substituteAll {
src = ./passbook-openssl.patch;
src = ./openssl.patch;
openssl = lib.getExe openssl;
})
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

buildPythonPackage rec {
pname = "pretix-zugferd";
version = "2.2.2";
version = "2.3.0";
pyproject = true;

src = fetchFromGitHub {
owner = "pretix";
repo = "pretix-zugferd";
rev = "v${version}";
hash = "sha256-urf5HrC3Y64hH+U738t9fchoeR2sawlJAQoLFtwebA4=";
hash = "sha256-/efhp9B/cw/C3Bok8/E93dOrP9FHfaVZNSwC/j2lNuA=";
};

postPatch = ''
Expand Down
13 changes: 9 additions & 4 deletions pkgs/development/python-modules/django-i18nfield/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
buildPythonPackage,
fetchFromGitHub,

# build-system
setuptools,

# tests
djangorestframework,
html5lib,
Expand All @@ -12,18 +15,20 @@
pyyaml,
}:

buildPythonPackage {
buildPythonPackage rec {
pname = "django-i18nfield";
version = "1.10.2";
format = "setuptools";
pyproject = true;

src = fetchFromGitHub {
owner = "raphaelm";
repo = "django-i18nfield";
rev = "10488eb6c673be50e50387c76085a7c8d84e9157";
hash = "sha256-FF980LTw7RFuG9QgxA96yJsSczCNNMq9WsbacQqIReE=";
tag = version;
hash = "sha256-27PR2jLDXxRSgbJvRxDSBK4sTiqGAhP+XYg/fCg9AzM=";
};

build-system = [ setuptools ];

env.DJANGO_SETTINGS_MODULE = "tests.settings";

nativeCheckInputs = [
Expand Down
20 changes: 12 additions & 8 deletions pkgs/development/python-modules/django-localflavor/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
buildPythonPackage,
fetchFromGitHub,

# bring your own
django,
# build-system
setuptools,

# propagates
# dependencies
django,
python-stdnum,

# tests
Expand All @@ -17,7 +18,7 @@
buildPythonPackage rec {
pname = "django-localflavor";
version = "4.0";
format = "setuptools";
pyproject = true;

src = fetchFromGitHub {
owner = "django";
Expand All @@ -26,9 +27,12 @@ buildPythonPackage rec {
hash = "sha256-UWp3ei1VlEsEfjbJIE+MpffSzYF4X1HEQw+z+5kZoP0=";
};

buildInputs = [ django ];
build-system = [ setuptools ];

propagatedBuildInputs = [ python-stdnum ];
dependencies = [
django
python-stdnum
];

pythonImportsCheck = [
# samples
Expand All @@ -41,12 +45,12 @@ buildPythonPackage rec {
"localflavor.za"
];

checkInputs = [
nativeCheckInputs = [
pytest-django
pytestCheckHook
];

DJANGO_SETTINGS_MODULE = "tests.settings";
env.DJANGO_SETTINGS_MODULE = "tests.settings";

meta = with lib; {
description = "Country-specific Django helpers";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/django-statici18n/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@

buildPythonPackage rec {
pname = "django-statici18n";
version = "2.5.0";
version = "2.6.0";
pyproject = true;

src = fetchFromGitHub {
owner = "zyegfryed";
repo = "django-statici18n";
tag = "v${version}";
hash = "sha256-n6HqHcXvz2ihwN+gJr5P+/Yt4RpuOu2yAjo9fiNZB54=";
hash = "sha256-G1JF/AQEDgvDamvjCYiQM7b6HfbdMBhfEUvT3yL1io0=";
};

build-system = [ setuptools ];
Expand Down

0 comments on commit 4c1b08b

Please sign in to comment.