evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / fi / fittrackee / package.nix
blobb197539cc421a4dfb5c1f51743cc7a3b001c3180
2   fetchFromGitHub,
3   fetchPypi,
4   lib,
5   stdenv,
6   postgresql,
7   postgresqlTestHook,
8   python3,
9 }:
10 let
11   python = python3.override {
12     self = python;
13     packageOverrides = self: super: {
14       sqlalchemy = super.sqlalchemy_1_4;
16       flask-sqlalchemy = super.flask-sqlalchemy.overridePythonAttrs (oldAttrs: rec {
17         version = "3.0.5";
19         src = fetchPypi {
20           pname = "flask_sqlalchemy";
21           inherit version;
22           hash = "sha256-xXZeWMoUVAG1IQbA9GF4VpJDxdolVWviwjHsxghnxbE=";
23         };
24       });
25     };
26   };
29 python.pkgs.buildPythonApplication rec {
30   pname = "fittrackee";
31   version = "0.8.10";
32   pyproject = true;
34   src = fetchFromGitHub {
35     owner = "SamR1";
36     repo = "FitTrackee";
37     rev = "refs/tags/v${version}";
38     hash = "sha256-K110H5Y8vQrRx2/O+2ezhpGp4G5sJUlzE+1cSYu7+4I=";
39   };
41   build-system = [
42     python.pkgs.poetry-core
43   ];
45   pythonRelaxDeps = [
46     "authlib"
47     "flask-limiter"
48     "gunicorn"
49     "pyjwt"
50     "pyopenssl"
51     "pytz"
52     "sqlalchemy"
53   ];
55   dependencies =
56     with python.pkgs;
57     [
58       authlib
59       babel
60       click
61       dramatiq
62       flask
63       flask-bcrypt
64       flask-dramatiq
65       flask-limiter
66       flask-migrate
67       flask-sqlalchemy
68       gpxpy
69       gunicorn
70       humanize
71       psycopg2-binary
72       pyjwt
73       pyopenssl
74       pytz
75       shortuuid
76       sqlalchemy
77       staticmap
78       ua-parser
79     ]
80     ++ dramatiq.optional-dependencies.redis
81     ++ flask-limiter.optional-dependencies.redis;
83   pythonImportsCheck = [ "fittrackee" ];
85   nativeCheckInputs = with python.pkgs; [
86     pytestCheckHook
87     freezegun
88     postgresqlTestHook
89     postgresql
90     time-machine
91   ];
93   pytestFlagsArray = [
94     "fittrackee"
95   ];
97   postgresqlTestSetupPost = ''
98     export DATABASE_TEST_URL=postgresql://$PGUSER/$PGDATABASE?host=$PGHOST
99   '';
101   doCheck = !stdenv.hostPlatform.isDarwin; # tests are a bit flaky on darwin
103   preCheck = ''
104     export TMP=$TMPDIR
105   '';
107   meta = {
108     description = "Self-hosted outdoor activity tracker";
109     homepage = "https://github.com/SamR1/FitTrackee";
110     changelog = "https://github.com/SamR1/FitTrackee/blob/${src.rev}/CHANGELOG.md";
111     license = lib.licenses.agpl3Only;
112     maintainers = with lib.maintainers; [ traxys ];
113   };