python3Packages.wagtail: 7.2.2 -> 7.3

https://github.com/wagtail/wagtail/blob/v7.3/CHANGELOG.txt

Migrates to finalAttrs, builds the npm bits.
This commit is contained in:
Martin Weinelt
2026-03-02 14:44:24 +01:00
parent 524c88a1e1
commit 99cc294595
@@ -1,7 +1,12 @@
{
lib,
buildPythonPackage,
fetchPypi,
fetchFromGitHub,
# frontend
fetchNpmDeps,
nodejs,
npmHooks,
# build-system
setuptools,
@@ -30,24 +35,42 @@
callPackage,
}:
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
pname = "wagtail";
version = "7.2.2";
version = "7.3";
pyproject = true;
# The GitHub source requires some assets to be compiled, which in turn
# requires fixing the upstream package lock. We need to use the PyPI release
# until https://github.com/wagtail/wagtail/pull/13136 gets merged.
src = fetchPypi {
inherit pname version;
hash = "sha256-v2rao6zZDZ7nc0dW3XAxsJAe7bgKSqTlGIqx5IHOML4=";
src = fetchFromGitHub {
owner = "wagtail";
repo = "wagtail";
tag = "v${finalAttrs.version}";
hash = "sha256-o/4jn32ffR3BPVNwtFKJ6PowXYi7SpjBqghdeZIl5tM=";
};
nativeBuildInputs = [
npmHooks.npmConfigHook
nodejs
];
npmDeps = fetchNpmDeps {
inherit (finalAttrs) src;
hash = "sha256-Uc16K1RZUCnr4qRe2u4yB44F+zYFBxMpEQCz5992RMA=";
};
preBuild = ''
# upstream only provides a hook for sdists, not wheels
# https://github.com/wagtail/wagtail/blob/v7.3/setup.py#L22
npm run build
'';
build-system = [
setuptools
];
pythonRelaxDeps = [ "django-tasks" ];
pythonRelaxDeps = [
"django-tasks"
"modelsearch"
];
dependencies = [
anyascii
@@ -83,8 +106,8 @@ buildPythonPackage rec {
description = "Django content management system focused on flexibility and user experience";
mainProgram = "wagtail";
homepage = "https://github.com/wagtail/wagtail";
changelog = "https://github.com/wagtail/wagtail/blob/v${version}/CHANGELOG.txt";
changelog = "https://github.com/wagtail/wagtail/blob/${finalAttrs.src.tag}/CHANGELOG.txt";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ sephi ];
};
}
})