diff --git a/nixos/modules/services/web-apps/weblate.nix b/nixos/modules/services/web-apps/weblate.nix index 4f13ad87ee03b..24995009b1189 100644 --- a/nixos/modules/services/web-apps/weblate.nix +++ b/nixos/modules/services/web-apps/weblate.nix @@ -132,6 +132,7 @@ let weblatePath = with pkgs; [ gitSVN + borgbackup #optional git-review diff --git a/pkgs/by-name/we/weblate/package.nix b/pkgs/by-name/we/weblate/package.nix index b27850ddbc684..93b73293955a9 100644 --- a/pkgs/by-name/we/weblate/package.nix +++ b/pkgs/by-name/we/weblate/package.nix @@ -23,12 +23,6 @@ let # https://github.com/encode/django-rest-framework/discussions/9342 disabledTests = (old.disabledTests or [ ]) ++ [ "test_invalid_inputs" ]; }); - celery = prev.celery.overridePythonAttrs (old: { - dependencies = old.dependencies ++ prev.celery.optional-dependencies.redis; - }); - python-redis-lock = prev.python-redis-lock.overridePythonAttrs (old: { - dependencies = old.dependencies ++ prev.python-redis-lock.optional-dependencies.django; - }); }; }; in @@ -47,7 +41,7 @@ python.pkgs.buildPythonApplication rec { owner = "WeblateOrg"; repo = "weblate"; rev = "refs/tags/weblate-${version}"; - hash = "sha256-mVcVthOiUTTYGRIp6pcubMsHZW55P86ZCfeno6JjN4I="; + hash = "sha256-h5+0lOMD+H0ehtZ0bngA9bI5va1I5KjZH9boaEtXJPo="; }; patches = [ @@ -76,67 +70,71 @@ python.pkgs.buildPythonApplication rec { ${python.pythonOnBuildForHost.interpreter} manage.py compress ''; - dependencies = with python.pkgs; [ - aeidon - ahocorasick-rs - borgbackup - celery - certifi - charset-normalizer - django-crispy-bootstrap3 - cryptography - cssselect - cython - cyrtranslit - diff-match-patch - django-appconf - django-celery-beat - django-compressor - django-cors-headers - django-crispy-forms - django-filter - django-redis - django-otp - django-otp-webauthn - django - djangorestframework - filelock - fluent-syntax - gitpython - hiredis - html2text - iniparse - jsonschema - lxml - mistletoe - nh3 - openpyxl - packaging - phply - pillow - pycairo - pygments - pygobject3 - pyicumessageformat - pyparsing - python-dateutil - python-redis-lock - qrcode - rapidfuzz - redis - requests - ruamel-yaml - sentry-sdk - siphashc - social-auth-app-django - social-auth-core - tesserocr - translate-toolkit - translation-finder - user-agents - weblate-language-data - weblate-schemas - ]; + dependencies = + with python.pkgs; + [ + aeidon + ahocorasick-rs + (toPythonModule (borgbackup.override { python3 = python; })) + celery + certifi + charset-normalizer + django-crispy-bootstrap3 + cryptography + cssselect + cython + cyrtranslit + diff-match-patch + django-appconf + django-celery-beat + django-compressor + django-cors-headers + django-crispy-forms + django-filter + django-redis + django-otp + django-otp-webauthn + django + djangorestframework + filelock + fluent-syntax + gitpython + hiredis + html2text + iniparse + jsonschema + lxml + mistletoe + nh3 + openpyxl + packaging + phply + pillow + pycairo + pygments + pygobject3 + pyicumessageformat + pyparsing + python-dateutil + python-redis-lock + qrcode + rapidfuzz + redis + requests + ruamel-yaml + sentry-sdk + siphashc + social-auth-app-django + social-auth-core + tesserocr + translate-toolkit + translation-finder + user-agents + weblate-language-data + weblate-schemas + ] + ++ python-redis-lock.optional-dependencies.django + ++ celery.optional-dependencies.redis; optional-dependencies = { postgres = with python.pkgs; [ psycopg ]; @@ -164,7 +162,10 @@ python.pkgs.buildPythonApplication rec { meta = with lib; { description = "Web based translation tool with tight version control integration"; homepage = "https://weblate.org/"; - license = licenses.gpl3Plus; + license = with licenses; [ + gpl3Plus + mit + ]; platforms = platforms.linux; maintainers = with maintainers; [ erictapen ]; }; diff --git a/pkgs/development/python-modules/ahocorasick-rs/default.nix b/pkgs/development/python-modules/ahocorasick-rs/default.nix index 3ad7ebbc44bd4..aeb12385ac798 100644 --- a/pkgs/development/python-modules/ahocorasick-rs/default.nix +++ b/pkgs/development/python-modules/ahocorasick-rs/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { src = fetchPypi { inherit version; pname = "ahocorasick_rs"; - sha256 = "sha256-lzRwODlJlymMSih3CqNIeR+HrUbgVhroM1JuHFfW848="; + hash = "sha256-lzRwODlJlymMSih3CqNIeR+HrUbgVhroM1JuHFfW848="; }; cargoDeps = rustPlatform.fetchCargoTarball { @@ -31,7 +31,6 @@ buildPythonPackage rec { nativeBuildInputs = with rustPlatform; [ maturinBuildHook cargoSetupHook - typing-extensions ]; nativeCheckInputs = [ @@ -46,6 +45,7 @@ buildPythonPackage rec { meta = with lib; { description = "Fast Aho-Corasick algorithm for Python"; homepage = "https://github.com/G-Research/ahocorasick_rs/"; + changelog = "https://github.com/G-Research/ahocorasick_rs/blob/${version}/CHANGELOG.md"; license = licenses.asl20; maintainers = with maintainers; [ erictapen ]; }; diff --git a/pkgs/development/python-modules/cyrtranslit/default.nix b/pkgs/development/python-modules/cyrtranslit/default.nix index 03e32e91d4c56..6d524bcf222a2 100644 --- a/pkgs/development/python-modules/cyrtranslit/default.nix +++ b/pkgs/development/python-modules/cyrtranslit/default.nix @@ -15,8 +15,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "opendatakosovo"; repo = "cyrillic-transliteration"; - rev = "v${version}"; - sha256 = "sha256-t8UTOmjGqjmxU7+Po0/HmOPWAvcgZibaUC9dMlttA/0="; + rev = "refs/tags/v${version}"; + hash = "sha256-t8UTOmjGqjmxU7+Po0/HmOPWAvcgZibaUC9dMlttA/0="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/django-crispy-bootstrap3/default.nix b/pkgs/development/python-modules/django-crispy-bootstrap3/default.nix index caf2f6655badb..3fe7e0c74978f 100644 --- a/pkgs/development/python-modules/django-crispy-bootstrap3/default.nix +++ b/pkgs/development/python-modules/django-crispy-bootstrap3/default.nix @@ -21,15 +21,16 @@ buildPythonPackage rec { hash = "sha256-w5CGWf14Wa8hndpk5r4hlz6gGykvRL+1AhA5Pz5Ejtk="; }; + build-system = [ setuptools ]; + dependencies = [ django - setuptools + django-crispy-forms ]; nativeCheckInputs = [ pytest-django pytestCheckHook - django-crispy-forms ]; pythonImportsCheck = [ "crispy_bootstrap3" ]; @@ -37,6 +38,7 @@ buildPythonPackage rec { meta = with lib; { description = "Bootstrap 3 template pack for django-crispy-forms"; homepage = "https://github.com/django-crispy-forms/crispy-bootstrap3"; + changelog = "https://github.com/django-crispy-forms/crispy-bootstrap3/blob/${version}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ erictapen ]; }; diff --git a/pkgs/development/python-modules/django-crispy-bootstrap4/default.nix b/pkgs/development/python-modules/django-crispy-bootstrap4/default.nix index 7db68ffc9ccda..eb533ddec43f0 100644 --- a/pkgs/development/python-modules/django-crispy-bootstrap4/default.nix +++ b/pkgs/development/python-modules/django-crispy-bootstrap4/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "django-crispy-bootstrap4"; version = "2024.1"; - format = "pyproject"; + pyproject = true; src = fetchFromGitHub { owner = "django-crispy-forms"; @@ -21,15 +21,16 @@ buildPythonPackage rec { hash = "sha256-upHrNDhoY+8qD+aeXPcY452xUIyYjW0apf8mVo6pqY4="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ django - setuptools + django-crispy-forms ]; nativeCheckInputs = [ pytest-django pytestCheckHook - django-crispy-forms ]; pythonImportsCheck = [ "crispy_bootstrap4" ]; @@ -37,6 +38,7 @@ buildPythonPackage rec { meta = with lib; { description = "Bootstrap 4 template pack for django-crispy-forms"; homepage = "https://github.com/django-crispy-forms/crispy-bootstrap4"; + changelog = "https://github.com/django-crispy-forms/crispy-bootstrap4/blob/${version}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ onny ]; }; diff --git a/pkgs/development/python-modules/django-crispy-bootstrap5/default.nix b/pkgs/development/python-modules/django-crispy-bootstrap5/default.nix index 6fc014bcb38a7..87ccaa6a9e6ae 100644 --- a/pkgs/development/python-modules/django-crispy-bootstrap5/default.nix +++ b/pkgs/development/python-modules/django-crispy-bootstrap5/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "django-crispy-bootstrap5"; version = "2024.2"; - format = "pyproject"; + pyproject = true; src = fetchFromGitHub { owner = "django-crispy-forms"; @@ -21,15 +21,16 @@ buildPythonPackage rec { hash = "sha256-ehcDwy53pZCqouvUm6qJG2FJzlFZaygTZxNYPOqH1q0="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ django - setuptools + django-crispy-forms ]; nativeCheckInputs = [ pytest-django pytestCheckHook - django-crispy-forms ]; pythonImportsCheck = [ "crispy_bootstrap5" ]; @@ -37,6 +38,7 @@ buildPythonPackage rec { meta = with lib; { description = "Bootstrap 5 template pack for django-crispy-forms"; homepage = "https://github.com/django-crispy-forms/crispy-bootstrap5"; + changelog = "https://github.com/django-crispy-forms/crispy-bootstrap5/blob/v${version}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ onny ]; }; diff --git a/pkgs/development/python-modules/django-otp-webauthn/default.nix b/pkgs/development/python-modules/django-otp-webauthn/default.nix index 870e36cbcb4ed..304d6f543ae42 100644 --- a/pkgs/development/python-modules/django-otp-webauthn/default.nix +++ b/pkgs/development/python-modules/django-otp-webauthn/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { src = fetchPypi { inherit version; pname = "django_otp_webauthn"; - sha256 = "sha256-+Y46/PDeXL9zayoZykaU63faQmnLHzYPmqJJeRBx+hs="; + hash = "sha256-+Y46/PDeXL9zayoZykaU63faQmnLHzYPmqJJeRBx+hs="; }; build-system = [ hatchling ]; @@ -36,7 +36,7 @@ buildPythonPackage rec { meta = with lib; { description = "Passkey support for Django"; homepage = "https://github.com/Stormbase/django-otp-webauthn"; - changelog = "https://github.com/Stormbase/django-otp-webauthn/blob/main/CHANGELOG.md"; + changelog = "https://github.com/Stormbase/django-otp-webauthn/blob/v${version}/CHANGELOG.md"; license = licenses.bsd3; maintainers = with maintainers; [ erictapen ]; }; diff --git a/pkgs/development/python-modules/phply/default.nix b/pkgs/development/python-modules/phply/default.nix index 5844e92d28072..b3550f79a49fa 100644 --- a/pkgs/development/python-modules/phply/default.nix +++ b/pkgs/development/python-modules/phply/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchPypi, + setuptools, ply, pytestCheckHook, }: @@ -10,12 +11,15 @@ buildPythonPackage rec { pname = "phply"; version = "1.2.6"; + pyproject = true; + src = fetchPypi { - pname = "phply"; - inherit version; - sha256 = "sha256-Cyd3TShfUHo0RYBaBfj7KZj1bXCScPeLiSCLZbDYSRc="; + inherit pname version; + hash = "sha256-Cyd3TShfUHo0RYBaBfj7KZj1bXCScPeLiSCLZbDYSRc="; }; + build-system = [ setuptools ]; + dependencies = [ ply ]; nativeCheckInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/pyicumessageformat/default.nix b/pkgs/development/python-modules/pyicumessageformat/default.nix index efa0969006b8e..f37cee1ad919e 100644 --- a/pkgs/development/python-modules/pyicumessageformat/default.nix +++ b/pkgs/development/python-modules/pyicumessageformat/default.nix @@ -13,8 +13,7 @@ buildPythonPackage rec { build-system = [ setuptools ]; src = fetchPypi { - pname = "pyicumessageformat"; - inherit version; + inherit pname version; hash = "sha256-s+l8DtEMKxA/DzpwGqZSlwDqCrZuDzsj3I5K7hgfyEA="; }; @@ -25,6 +24,8 @@ buildPythonPackage rec { meta = with lib; { description = "Unopinionated Python3 parser for ICU MessageFormat"; homepage = "https://github.com/SirStendec/pyicumessageformat/"; + # Based on master, as upstream doesn't tag their releases on GitHub anymore + changelog = "https://github.com/SirStendec/pyicumessageformat/blob/master/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ erictapen ]; }; diff --git a/pkgs/development/python-modules/siphashc/default.nix b/pkgs/development/python-modules/siphashc/default.nix index 76c9ea7ad5c0b..639f06ead5f1e 100644 --- a/pkgs/development/python-modules/siphashc/default.nix +++ b/pkgs/development/python-modules/siphashc/default.nix @@ -13,8 +13,7 @@ buildPythonPackage rec { build-system = [ setuptools ]; src = fetchPypi { - pname = "siphashc"; - inherit version; + inherit pname version; sha256 = "sha256-ptNpy7VkUXHbjvdir6v+eYOmtQ/j8XPXq4lj7ceS/5s="; }; @@ -25,7 +24,8 @@ buildPythonPackage rec { meta = with lib; { description = "Python c-module for siphash"; homepage = "https://github.com/WeblateOrg/siphashc"; - license = licenses.mit; + changelog = "https://github.com/WeblateOrg/siphashc/blob/${version}/CHANGES.rst"; + license = licenses.isc; maintainers = with maintainers; [ erictapen ]; }; } diff --git a/pkgs/development/python-modules/translate-toolkit/default.nix b/pkgs/development/python-modules/translate-toolkit/default.nix index 0db2168149a63..89bc4a2fde543 100644 --- a/pkgs/development/python-modules/translate-toolkit/default.nix +++ b/pkgs/development/python-modules/translate-toolkit/default.nix @@ -30,7 +30,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "translate_toolkit"; inherit version; - sha256 = "sha256-95zIAelFSNK5+f1GY8DUgHPDQBS5K+9ULjXaSaa0wWM="; + hash = "sha256-95zIAelFSNK5+f1GY8DUgHPDQBS5K+9ULjXaSaa0wWM="; }; dependencies = [ diff --git a/pkgs/development/python-modules/translation-finder/default.nix b/pkgs/development/python-modules/translation-finder/default.nix index c31c764136467..1341054331d88 100644 --- a/pkgs/development/python-modules/translation-finder/default.nix +++ b/pkgs/development/python-modules/translation-finder/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchPypi, + setuptools, charset-normalizer, ruamel-yaml, weblate-language-data, @@ -12,14 +13,17 @@ buildPythonPackage rec { pname = "translation-finder"; version = "2.16"; + pyproject = true; + src = fetchPypi { - pname = "translation-finder"; - inherit version; + inherit pname version; hash = "sha256-a1C+j4Zo0DJ9BWDn5Zsu4zAftcUixfPktAWdqiFJpiU="; }; patches = [ ./fix_tests.patch ]; + build-system = [ setuptools ]; + dependencies = [ charset-normalizer ruamel-yaml @@ -33,6 +37,7 @@ buildPythonPackage rec { meta = with lib; { description = "Translation file finder for Weblate"; homepage = "https://github.com/WeblateOrg/translation-finder"; + changelog = "https://github.com/WeblateOrg/translation-finder/blob/${version}/CHANGES.rst"; license = licenses.gpl3Only; maintainers = with maintainers; [ erictapen ]; }; diff --git a/pkgs/development/python-modules/weblate-schemas/default.nix b/pkgs/development/python-modules/weblate-schemas/default.nix index 728612b8a103f..1fff774c17159 100644 --- a/pkgs/development/python-modules/weblate-schemas/default.nix +++ b/pkgs/development/python-modules/weblate-schemas/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchPypi, + setuptools, fqdn, jsonschema, rfc3987, @@ -13,12 +14,16 @@ buildPythonPackage rec { pname = "weblate-schemas"; version = "2024.1"; + pyproject = true; + src = fetchPypi { pname = "weblate_schemas"; inherit version; hash = "sha256-nYPLD3VDO1Z97HI79J6Yjj3bWp1xKB79FWPCW146iz4="; }; + build-system = [ setuptools ]; + dependencies = [ fqdn jsonschema @@ -33,6 +38,7 @@ buildPythonPackage rec { meta = with lib; { description = "Schemas used by Weblate"; homepage = "https://github.com/WeblateOrg/weblate_schemas"; + changelog = "https://github.com/WeblateOrg/weblate_schemas/blob/${version}/CHANGES.rst"; license = licenses.mit; maintainers = with maintainers; [ erictapen ]; };