nixpkgs/pkgs/by-name/fi/fittrackee/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

115 lines
2.2 KiB
Nix
Raw Normal View History

{
fetchFromGitHub,
fetchPypi,
lib,
2024-09-21 23:26:59 +00:00
stdenv,
postgresql,
postgresqlTestHook,
python3,
2023-04-22 21:57:57 +00:00
}:
let
python = python3.override {
self = python;
2023-04-22 21:57:57 +00:00
packageOverrides = self: super: {
sqlalchemy = super.sqlalchemy_1_4;
flask-sqlalchemy = super.flask-sqlalchemy.overridePythonAttrs (oldAttrs: rec {
version = "3.0.5";
src = fetchPypi {
pname = "flask_sqlalchemy";
inherit version;
hash = "sha256-xXZeWMoUVAG1IQbA9GF4VpJDxdolVWviwjHsxghnxbE=";
};
});
2023-04-22 21:57:57 +00:00
};
};
in
python.pkgs.buildPythonApplication rec {
pname = "fittrackee";
2024-10-16 15:31:11 +00:00
version = "0.8.10";
pyproject = true;
2023-04-22 21:57:57 +00:00
src = fetchFromGitHub {
owner = "SamR1";
repo = "FitTrackee";
rev = "refs/tags/v${version}";
2024-10-16 15:31:11 +00:00
hash = "sha256-K110H5Y8vQrRx2/O+2ezhpGp4G5sJUlzE+1cSYu7+4I=";
2023-04-22 21:57:57 +00:00
};
build-system = [
python.pkgs.poetry-core
];
pythonRelaxDeps = [
2024-09-01 06:07:53 +00:00
"authlib"
"flask-limiter"
"gunicorn"
"pyjwt"
"pyopenssl"
2024-09-21 23:26:59 +00:00
"pytz"
"sqlalchemy"
2023-04-22 21:57:57 +00:00
];
dependencies =
with python.pkgs;
[
authlib
babel
click
dramatiq
flask
flask-bcrypt
flask-dramatiq
flask-limiter
flask-migrate
flask-sqlalchemy
gpxpy
gunicorn
humanize
2024-09-03 17:21:02 +00:00
psycopg2-binary
pyjwt
pyopenssl
pytz
shortuuid
sqlalchemy
staticmap
ua-parser
]
++ dramatiq.optional-dependencies.redis
++ flask-limiter.optional-dependencies.redis;
2023-04-22 21:57:57 +00:00
pythonImportsCheck = [ "fittrackee" ];
nativeCheckInputs = with python.pkgs; [
pytestCheckHook
freezegun
postgresqlTestHook
postgresql
time-machine
2023-04-22 21:57:57 +00:00
];
pytestFlagsArray = [
"fittrackee"
];
postgresqlTestSetupPost = ''
export DATABASE_TEST_URL=postgresql://$PGUSER/$PGDATABASE?host=$PGHOST
2023-04-22 21:57:57 +00:00
'';
2024-09-21 23:26:59 +00:00
doCheck = !stdenv.hostPlatform.isDarwin; # tests are a bit flaky on darwin
2023-04-22 21:57:57 +00:00
preCheck = ''
2024-09-21 23:26:59 +00:00
export TMP=$TMPDIR
2023-04-22 21:57:57 +00:00
'';
meta = {
description = "Self-hosted outdoor activity tracker";
2023-04-22 21:57:57 +00:00
homepage = "https://github.com/SamR1/FitTrackee";
changelog = "https://github.com/SamR1/FitTrackee/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ traxys ];
2023-04-22 21:57:57 +00:00
};
}