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.68.2";
39 pyproject = true;
40
41 src = fetchFromGitHub {
42 owner = "RhetTbull";
43 repo = "osxphotos";
44 rev = "refs/tags/v${version}";
45 hash = "sha256-iPeidbPoF0AG6TJDWloXwpwzJ4oWEglKVLp2yywnyZs=";
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 ];
81
82 pythonImportsCheck = [ "osxphotos" ];
83 nativeCheckInputs = [
84 pytestCheckHook
85 pytest-mock
86 ];
87
88 preCheck = ''
89 export HOME=$(mktemp -d)
90 '';
91
92 disabledTestPaths = [ "tests/test_comments.py" ];
93 disabledTests = [
94 "test_iphoto_info"
95 "test_from_to_date_tz"
96 "test_function_url"
97 "test_get_local_tz"
98 "test_datetime_naive_to_local"
99 "test_from_to_date_tz"
100 "test_query_from_to_date_alt_location"
101 "test_query_function_url"
102 ];
103
104 meta = {
105 description = "Export photos from Apple's macOS Photos app and query the Photos library database to access metadata about images";
106 homepage = "https://github.com/RhetTbull/osxphotos";
107 changelog = "https://github.com/RhetTbull/osxphotos/blob/${src.rev}/CHANGELOG.md";
108 license = lib.licenses.mit;
109 maintainers = with lib.maintainers; [ sigmanificient ];
110 broken = stdenv.isDarwin;
111 };
112}