1{
2 stdenv,
3 lib,
4 buildPythonPackage,
5 fetchFromGitHub,
6 setuptools,
7
8 bitmath,
9 bpylist2,
10 click,
11 mako,
12 more-itertools,
13 objexplore,
14 packaging,
15 pathvalidate,
16 pip,
17 ptpython,
18 pytimeparse2,
19 pyyaml,
20 requests,
21 rich-theme-manager,
22 rich,
23 shortuuid,
24 strpdatetime,
25 tenacity,
26 textx,
27 toml,
28 wrapt,
29 wurlitzer,
30 xdg-base-dirs,
31
32 pytestCheckHook,
33 pytest-mock,
34}:
35
36buildPythonPackage rec {
37 pname = "osxphotos";
38 version = "0.69.2";
39 pyproject = true;
40
41 src = fetchFromGitHub {
42 owner = "RhetTbull";
43 repo = "osxphotos";
44 tag = "v${version}";
45 hash = "sha256-uVcoGIfxz+jKirnE3giST/v20eA5pq+LHgrsRb5b+Lc=";
46 };
47
48 build-system = [ setuptools ];
49 dependencies = [
50 bitmath
51 bpylist2
52 click
53 mako
54 more-itertools
55 objexplore
56 packaging
57 pathvalidate
58 pip
59 ptpython
60 pytimeparse2
61 pyyaml
62 requests
63 rich-theme-manager
64 rich
65 shortuuid
66 strpdatetime
67 tenacity
68 textx
69 toml
70 wrapt
71 wurlitzer
72 xdg-base-dirs
73 ];
74
75 pythonRelaxDeps = [
76 "mako"
77 "more-itertools"
78 "objexplore"
79 "textx"
80 "tenacity"
81 ];
82
83 pythonImportsCheck = [ "osxphotos" ];
84 nativeCheckInputs = [
85 pytestCheckHook
86 pytest-mock
87 ];
88
89 preCheck = ''
90 export HOME=$(mktemp -d)
91 '';
92
93 disabledTestPaths = [ "tests/test_comments.py" ];
94 disabledTests = [
95 "test_iphoto_info"
96 "test_from_to_date_tz"
97 "test_function_url"
98 "test_get_local_tz"
99 "test_datetime_naive_to_local"
100 "test_from_to_date_tz"
101 "test_query_from_to_date_alt_location"
102 "test_query_function_url"
103 ];
104
105 meta = {
106 description = "Export photos from Apple's macOS Photos app and query the Photos library database to access metadata about images";
107 homepage = "https://github.com/RhetTbull/osxphotos";
108 changelog = "https://github.com/RhetTbull/osxphotos/blob/${src.tag}/CHANGELOG.md";
109 license = lib.licenses.mit;
110 maintainers = with lib.maintainers; [ sigmanificient ];
111 broken = stdenv.hostPlatform.isDarwin;
112 };
113}