nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 arrow,
4 buildPythonPackage,
5 fetchFromGitHub,
6 poetry-core,
7 pydantic,
8 pytest-cov-stub,
9 pytestCheckHook,
10 requests-oauthlib,
11 responses,
12 typing-extensions,
13}:
14
15buildPythonPackage rec {
16 pname = "withings-api";
17 version = "2.4.0";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "vangorra";
22 repo = "python_withings_api";
23 tag = version;
24 hash = "sha256-8cOLHYnodPGk1b1n6xbVyW2iju3cG6MgnzYTKDsP/nw=";
25 };
26
27 postPatch = ''
28 substituteInPlace pyproject.toml \
29 --replace-fail 'requests-oauth = ">=0.4.1"' '''
30 '';
31
32 build-system = [ poetry-core ];
33
34 dependencies = [
35 arrow
36 requests-oauthlib
37 typing-extensions
38 pydantic
39 ];
40
41 nativeCheckInputs = [
42 pytest-cov-stub
43 pytestCheckHook
44 responses
45 ];
46
47 pythonImportsCheck = [ "withings_api" ];
48
49 meta = {
50 description = "Library for the Withings Health API";
51 homepage = "https://github.com/vangorra/python_withings_api";
52 changelog = "https://github.com/vangorra/python_withings_api/releases/tag/${version}";
53 license = lib.licenses.mit;
54 maintainers = with lib.maintainers; [ kittywitch ];
55 broken = lib.versionAtLeast pydantic.version "2";
56 };
57}