nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 python3Packages,
4 fetchFromGitHub,
5 writableTmpDirAsHomeHook,
6}:
7
8python3Packages.buildPythonApplication rec {
9 pname = "garmindb";
10 version = "3.6.7";
11 pyproject = true;
12
13 src = fetchFromGitHub {
14 owner = "tcgoetz";
15 repo = "garmindb";
16 tag = "v${version}";
17 hash = "sha256-Dosw6/n4GYYJR3KFP4RdNOUpACpRAfMMmyNj/J54TMk=";
18 };
19
20 pythonRelaxDeps = [
21 "sqlalchemy"
22 "cached-property"
23 "garth"
24 "tqdm"
25 "fitfile"
26 "tcxfile"
27 "idbutils"
28 ];
29
30 build-system = with python3Packages; [ setuptools ];
31
32 dependencies = with python3Packages; [
33 sqlalchemy
34 python-dateutil
35 cached-property
36 tqdm
37 garth
38 fitfile
39 tcxfile
40 idbutils
41 tornado
42 ];
43
44 # require data files
45 disabledTestPaths = [
46 "test/test_activities_db.py"
47 "test/test_config.py"
48 "test/test_copy.py"
49 "test/test_db_base.py"
50 "test/test_fit_file.py"
51 "test/test_garmin_db.py"
52 "test/test_garmin_db_objects.py"
53 "test/test_garmin_summary_db.py"
54 "test/test_monitoring_db.py"
55 "test/test_profile_file.py"
56 "test/test_summary_db.py"
57 "test/test_summary_db_base.py"
58 "test/test_tcx_file.py"
59 ];
60
61 nativeCheckInputs = [
62 python3Packages.pytestCheckHook
63 writableTmpDirAsHomeHook
64 ];
65
66 pythonImportsCheck = [ "garmindb" ];
67
68 meta = {
69 description = "Download and parse data from Garmin Connect or a Garmin watch";
70 homepage = "https://github.com/tcgoetz/GarminDB";
71 changelog = "https://github.com/tcgoetz/GarminDB/releases/tag/${src.tag}";
72 license = lib.licenses.gpl2Only;
73 platforms = lib.platforms.unix;
74 maintainers = with lib.maintainers; [
75 ethancedwards8
76 matthiasbeyer
77 ];
78 mainProgram = "garmindb";
79 };
80}