1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 garth,
6 lxml,
7 python-dotenv,
8 pythonOlder,
9 requests,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "withings-sync";
15 version = "4.2.7";
16 pyproject = true;
17
18 disabled = pythonOlder "3.10";
19
20 src = fetchFromGitHub {
21 owner = "jaroslawhartman";
22 repo = "withings-sync";
23 tag = "v${version}";
24 hash = "sha256-ySl2nRR8t7c3NhjgjSzLQ+hcJuh+kx5aoaVPJF56HR0=";
25 };
26
27 postPatch = ''
28 substituteInPlace setup.py \
29 --replace-fail "1.0.0.dev1" "${version}"
30 '';
31
32 pythonRelaxDeps = true;
33
34 build-system = [ setuptools ];
35
36 dependencies = [
37 garth
38 lxml
39 python-dotenv
40 requests
41 ];
42
43 pythonImportsCheck = [ "withings_sync" ];
44
45 meta = with lib; {
46 description = "Synchronisation of Withings weight";
47 homepage = "https://github.com/jaroslawhartman/withings-sync";
48 changelog = "https://github.com/jaroslawhartman/withings-sync/releases/tag/v${version}";
49 license = licenses.mit;
50 maintainers = with maintainers; [ fab ];
51 mainProgram = "withings-sync";
52 };
53}