Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weblate: address additional review on package and dependencies #338217

Merged
merged 12 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions nixos/modules/services/web-apps/weblate.nix
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ let

weblatePath = with pkgs; [
gitSVN
borgbackup

#optional
git-review
Expand Down
139 changes: 70 additions & 69 deletions pkgs/by-name/we/weblate/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 = [
Expand Down Expand Up @@ -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 ];
Expand Down Expand Up @@ -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 ];
};
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/ahocorasick-rs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ buildPythonPackage rec {
src = fetchPypi {
inherit version;
pname = "ahocorasick_rs";
sha256 = "sha256-lzRwODlJlymMSih3CqNIeR+HrUbgVhroM1JuHFfW848=";
hash = "sha256-lzRwODlJlymMSih3CqNIeR+HrUbgVhroM1JuHFfW848=";
};

cargoDeps = rustPlatform.fetchCargoTarball {
Expand All @@ -31,7 +31,6 @@ buildPythonPackage rec {
nativeBuildInputs = with rustPlatform; [
maturinBuildHook
cargoSetupHook
typing-extensions
];

nativeCheckInputs = [
Expand All @@ -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 ];
};
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/cyrtranslit/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,24 @@ 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" ];

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 ];
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
buildPythonPackage rec {
pname = "django-crispy-bootstrap4";
version = "2024.1";
format = "pyproject";
pyproject = true;

src = fetchFromGitHub {
owner = "django-crispy-forms";
Expand All @@ -21,22 +21,24 @@ 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" ];

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 ];
};
Expand Down
erictapen marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
buildPythonPackage rec {
pname = "django-crispy-bootstrap5";
version = "2024.2";
format = "pyproject";
pyproject = true;

src = fetchFromGitHub {
owner = "django-crispy-forms";
Expand All @@ -21,22 +21,24 @@ 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" ];

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 ];
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand All @@ -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 ];
};
Expand Down
10 changes: 7 additions & 3 deletions pkgs/development/python-modules/phply/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
lib,
buildPythonPackage,
fetchPypi,
setuptools,
ply,
pytestCheckHook,
}:
Expand All @@ -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 ];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ buildPythonPackage rec {
build-system = [ setuptools ];

src = fetchPypi {
pname = "pyicumessageformat";
inherit version;
inherit pname version;
hash = "sha256-s+l8DtEMKxA/DzpwGqZSlwDqCrZuDzsj3I5K7hgfyEA=";
};

Expand All @@ -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 ];
};
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/python-modules/siphashc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ buildPythonPackage rec {
build-system = [ setuptools ];

src = fetchPypi {
pname = "siphashc";
inherit version;
inherit pname version;
sha256 = "sha256-ptNpy7VkUXHbjvdir6v+eYOmtQ/j8XPXq4lj7ceS/5s=";
};

Expand All @@ -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 ];
};
}
Loading