mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
canaille: 0.0.57 -> 0.0.74
Changelog: https://gitlab.com/yaal/canaille/-/blob/0.0.74/CHANGES.rst
This commit is contained in:
parent
d66bbf3b89
commit
d96cc44cd3
2 changed files with 27 additions and 17 deletions
|
@ -56,7 +56,7 @@ import ./make-test-python.nix (
|
||||||
server.succeed("sudo -iu canaille -- canaille create user --user-name admin --password adminpass --emails admin@${domain}")
|
server.succeed("sudo -iu canaille -- canaille create user --user-name admin --password adminpass --emails admin@${domain}")
|
||||||
json_str = server.succeed("sudo -iu canaille -- canaille get user")
|
json_str = server.succeed("sudo -iu canaille -- canaille get user")
|
||||||
assert json.loads(json_str)[0]["user_name"] == "admin"
|
assert json.loads(json_str)[0]["user_name"] == "admin"
|
||||||
server.succeed("sudo -iu canaille -- canaille check")
|
server.succeed("sudo -iu canaille -- canaille config check")
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
lib,
|
lib,
|
||||||
python3,
|
python3,
|
||||||
fetchFromGitLab,
|
fetchFromGitLab,
|
||||||
|
fetchpatch,
|
||||||
openldap,
|
openldap,
|
||||||
nixosTests,
|
nixosTests,
|
||||||
}:
|
}:
|
||||||
|
@ -11,7 +12,7 @@ let
|
||||||
in
|
in
|
||||||
python.pkgs.buildPythonApplication rec {
|
python.pkgs.buildPythonApplication rec {
|
||||||
pname = "canaille";
|
pname = "canaille";
|
||||||
version = "0.0.57";
|
version = "0.0.74";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
disabled = python.pythonOlder "3.10";
|
disabled = python.pythonOlder "3.10";
|
||||||
|
@ -20,9 +21,17 @@ python.pkgs.buildPythonApplication rec {
|
||||||
owner = "yaal";
|
owner = "yaal";
|
||||||
repo = "canaille";
|
repo = "canaille";
|
||||||
rev = "refs/tags/${version}";
|
rev = "refs/tags/${version}";
|
||||||
hash = "sha256-pesN7k5kGHi3dqTMaXWdCsNsnaJxXv/Ku1wVC9N9a3k=";
|
hash = "sha256-FL02ADM7rUU43XR71UWr4FLr/NeUau7zRwTMOSFm1T4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# https://gitlab.com/yaal/canaille/-/merge_requests/275
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://gitlab.com/yaal/canaille/-/commit/1c7fc8b1034a4423f7f46ad8adeced854910b702.patch";
|
||||||
|
hash = "sha256-fu7D010NG7yUChOve7HY3e7mm2c/UGpfcTAiTU8BnGg=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
build-system = with python.pkgs; [
|
build-system = with python.pkgs; [
|
||||||
hatchling
|
hatchling
|
||||||
babel
|
babel
|
||||||
|
@ -32,10 +41,12 @@ python.pkgs.buildPythonApplication rec {
|
||||||
dependencies =
|
dependencies =
|
||||||
with python.pkgs;
|
with python.pkgs;
|
||||||
[
|
[
|
||||||
|
blinker
|
||||||
flask
|
flask
|
||||||
|
flask-caching
|
||||||
flask-wtf
|
flask-wtf
|
||||||
pydantic-settings
|
pydantic-settings
|
||||||
requests
|
httpx
|
||||||
wtforms
|
wtforms
|
||||||
]
|
]
|
||||||
++ sentry-sdk.optional-dependencies.flask;
|
++ sentry-sdk.optional-dependencies.flask;
|
||||||
|
@ -57,6 +68,7 @@ python.pkgs.buildPythonApplication rec {
|
||||||
toml
|
toml
|
||||||
faker
|
faker
|
||||||
time-machine
|
time-machine
|
||||||
|
pytest-scim2-server
|
||||||
]
|
]
|
||||||
++ optional-dependencies.front
|
++ optional-dependencies.front
|
||||||
++ optional-dependencies.oidc
|
++ optional-dependencies.oidc
|
||||||
|
@ -79,27 +91,34 @@ python.pkgs.buildPythonApplication rec {
|
||||||
export SCHEMA="${openldap}/etc/schema"
|
export SCHEMA="${openldap}/etc/schema"
|
||||||
|
|
||||||
# Just use their example config for testing
|
# Just use their example config for testing
|
||||||
export CONFIG=canaille/config.sample.toml
|
export CONFIG=tests/app/fixtures/default-config.toml
|
||||||
'';
|
'';
|
||||||
|
|
||||||
optional-dependencies = with python.pkgs; {
|
optional-dependencies = with python.pkgs; {
|
||||||
front = [
|
front = [
|
||||||
email-validator
|
email-validator
|
||||||
flask-babel
|
flask-babel
|
||||||
|
flask-talisman
|
||||||
flask-themer
|
flask-themer
|
||||||
pycountry
|
pycountry
|
||||||
pytz
|
pytz
|
||||||
toml
|
tomlkit
|
||||||
zxcvbn-rs-py
|
zxcvbn-rs-py
|
||||||
];
|
];
|
||||||
oidc = [ authlib ];
|
oidc = [
|
||||||
|
authlib
|
||||||
|
joserfc
|
||||||
|
];
|
||||||
scim = [
|
scim = [
|
||||||
|
httpx
|
||||||
scim2-models
|
scim2-models
|
||||||
authlib
|
authlib
|
||||||
|
scim2-client
|
||||||
];
|
];
|
||||||
ldap = [ python-ldap ];
|
ldap = [ python-ldap ];
|
||||||
sentry = [ sentry-sdk ];
|
sentry = [ sentry-sdk ];
|
||||||
postgresql = [
|
postgresql = [
|
||||||
|
flask-alembic
|
||||||
passlib
|
passlib
|
||||||
sqlalchemy
|
sqlalchemy
|
||||||
sqlalchemy-json
|
sqlalchemy-json
|
||||||
|
@ -111,6 +130,7 @@ python.pkgs.buildPythonApplication rec {
|
||||||
qrcode
|
qrcode
|
||||||
];
|
];
|
||||||
sms = [ smpplib ];
|
sms = [ smpplib ];
|
||||||
|
server = [ hypercorn ];
|
||||||
};
|
};
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
@ -120,16 +140,6 @@ python.pkgs.buildPythonApplication rec {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
disabledTests = [
|
|
||||||
# cause by authlib being too up-to-date for this version of canaille
|
|
||||||
# see: https://github.com/NixOS/nixpkgs/issues/389861#issuecomment-2726361949
|
|
||||||
# FIX: update and see if this is fixed
|
|
||||||
"test_invalid_client[ldap_backend]"
|
|
||||||
"test_invalid_client[memory_backend]"
|
|
||||||
"test_invalid_client[sql_backend]"
|
|
||||||
"test_password_reset[sql_backend]"
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Lightweight Identity and Authorization Management";
|
description = "Lightweight Identity and Authorization Management";
|
||||||
homepage = "https://canaille.readthedocs.io/en/latest/index.html";
|
homepage = "https://canaille.readthedocs.io/en/latest/index.html";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue