Robert Schütz 2024-08-18 13:56:15 -07:00
parent 0c44eb6760
commit b7abe4e26b

View File

@ -26,29 +26,36 @@ let
in
python.pkgs.buildPythonApplication rec {
pname = "fit-trackee";
version = "0.8.5";
version = "0.8.6";
pyproject = true;
src = fetchFromGitHub {
owner = "SamR1";
repo = "FitTrackee";
rev = "refs/tags/v${version}";
hash = "sha256-BY4bBz9yBgAJ28iriqweAWm7Df5jh/W7bNlInmjMU5Q=";
hash = "sha256-lTDS+HfYG6ayXDotu7M2LUrw+1ZhQ0ftw0rTn4Mr3rQ=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail 'gunicorn = "^22.0.0"' 'gunicorn = "*"' \
--replace-fail psycopg2-binary psycopg2
'';
build-system = [
python3.pkgs.poetry-core
python.pkgs.poetry-core
];
pythonRelaxDeps = [
"flask-limiter"
"gunicorn"
"pyjwt"
"pyopenssl"
];
dependencies = with python.pkgs; [
authlib
babel
click
dramatiq
flask
flask-bcrypt
@ -67,7 +74,8 @@ python.pkgs.buildPythonApplication rec {
sqlalchemy
staticmap
ua-parser
] ++ dramatiq.optional-dependencies.redis;
] ++ dramatiq.optional-dependencies.redis
++ flask-limiter.optional-dependencies.redis;
pythonImportsCheck = [ "fittrackee" ];
@ -76,6 +84,7 @@ python.pkgs.buildPythonApplication rec {
freezegun
postgresqlTestHook
postgresql
time-machine
];
pytestFlagsArray = [
@ -83,11 +92,7 @@ python.pkgs.buildPythonApplication rec {
];
postgresqlTestSetupPost = ''
export DATABASE_TEST_URL=postgresql://$PGUSER/$PGDATABAS?host=$PGHOST
'';
postInstall = ''
mkdir -p $out/var/share/fittrackee-instance
export DATABASE_TEST_URL=postgresql://$PGUSER/$PGDATABASE?host=$PGHOST
'';
preCheck = ''
@ -95,7 +100,7 @@ python.pkgs.buildPythonApplication rec {
'';
meta = {
description = "Self-hosted outdoor activity tracker :bicyclist";
description = "Self-hosted outdoor activity tracker";
homepage = "https://github.com/SamR1/FitTrackee";
changelog = "https://github.com/SamR1/FitTrackee/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.agpl3Only;