1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, fetchpatch
5, poetry-core
6, requests-mock
7, pythonOlder
8, pytest-asyncio
9, pytestCheckHook
10, python-dateutil
11, requests
12}:
13
14buildPythonPackage rec {
15 pname = "flipr-api";
16 version = "1.4.1";
17 format = "pyproject";
18
19 disabled = pythonOlder "3.6";
20
21 src = fetchFromGitHub {
22 owner = "cnico";
23 repo = pname;
24 rev = version;
25 sha256 = "00qkzr2g38fpa7ndnbfx9m4d50lmz0j74nkxif3amnkbl4m6l5vn";
26 };
27
28 nativeBuildInputs = [
29 poetry-core
30 ];
31
32 propagatedBuildInputs = [
33 python-dateutil
34 requests
35 ];
36
37 checkInputs = [
38 requests-mock
39 pytest-asyncio
40 pytestCheckHook
41 ];
42
43 patches = [
44 # Switch to poetry-core, https://github.com/cnico/flipr-api/pull/4
45 (fetchpatch {
46 name = "switch-to-poetry-core.patch";
47 url = "https://github.com/cnico/flipr-api/commit/f14be1dfd4f46d4d43d9ea47e51cafca3cc18e86.patch";
48 sha256 = "1fdi19cq21zcjx4g132k480yhi5y0x5qj2l0h8k5zky5cdxs58r6";
49 })
50 ];
51
52 pythonImportsCheck = [ "flipr_api" ];
53
54 meta = with lib; {
55 description = "Python client for Flipr API";
56 homepage = "https://github.com/cnico/flipr-api";
57 license = licenses.mit;
58 maintainers = with maintainers; [ fab ];
59 };
60}