2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildPythonPackage,
|
2024-07-27 06:49:29 +00:00
|
|
|
|
|
|
|
# build-system
|
2024-06-05 15:53:02 +00:00
|
|
|
flit-core,
|
2024-07-27 06:49:29 +00:00
|
|
|
|
|
|
|
# dependencies
|
2024-06-05 15:53:02 +00:00
|
|
|
flask,
|
|
|
|
cachelib,
|
2024-07-27 06:49:29 +00:00
|
|
|
msgspec,
|
|
|
|
|
|
|
|
# checks
|
|
|
|
boto3,
|
|
|
|
flask-sqlalchemy,
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestCheckHook,
|
2024-07-27 06:49:29 +00:00
|
|
|
redis,
|
|
|
|
pymongo,
|
|
|
|
pymemcache,
|
|
|
|
python-memcached,
|
|
|
|
pkgs,
|
2023-08-22 20:05:09 +00:00
|
|
|
}:
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2024-04-21 15:54:59 +00:00
|
|
|
pname = "flask-session";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "0.8.0";
|
|
|
|
pyproject = true;
|
2021-12-19 01:06:50 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pallets-eco";
|
|
|
|
repo = "flask-session";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-QLtsM0MFgZbuLJPLc5/mUwyYc3bYxildNKNxOF8Z/3Y=";
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
build-system = [ flit-core ];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
dependencies = [
|
2023-08-22 20:05:09 +00:00
|
|
|
cachelib
|
2024-07-27 06:49:29 +00:00
|
|
|
flask
|
|
|
|
msgspec
|
2023-08-22 20:05:09 +00:00
|
|
|
];
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
flask-sqlalchemy
|
|
|
|
pytestCheckHook
|
|
|
|
redis
|
|
|
|
pymongo
|
|
|
|
pymemcache
|
|
|
|
python-memcached
|
|
|
|
boto3
|
2023-08-22 20:05:09 +00:00
|
|
|
];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
preCheck = ''
|
|
|
|
${pkgs.redis}/bin/redis-server &
|
|
|
|
${pkgs.memcached}/bin/memcached &
|
|
|
|
'';
|
|
|
|
|
|
|
|
postCheck = ''
|
|
|
|
kill %%
|
|
|
|
kill %%
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTests = [ "test_mongo_default" ]; # unfree
|
|
|
|
|
|
|
|
disabledTestPaths = [ "tests/test_dynamodb.py" ];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "flask_session" ];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Flask extension that adds support for server-side sessions";
|
2023-08-22 20:05:09 +00:00
|
|
|
homepage = "https://github.com/pallets-eco/flask-session";
|
|
|
|
changelog = "https://github.com/pallets-eco/flask-session/releases/tag/${version}";
|
2021-12-19 01:06:50 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ zhaofengli ];
|
|
|
|
};
|
|
|
|
}
|