1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, fetchpatch
5, pytestCheckHook
6, pythonOlder
7, borgbackup
8, appdirs
9, arrow
10, docopt
11, inform
12, nestedtext
13, parametrize-from-file
14, quantiphy
15, requests
16, shlib
17, voluptuous
18}:
19
20buildPythonPackage rec {
21 pname = "emborg";
22 version = "1.37";
23 format = "flit";
24
25 disabled = pythonOlder "3.7";
26
27 src = fetchFromGitHub {
28 owner = "KenKundert";
29 repo = "emborg";
30 rev = "refs/tags/v${version}";
31 hash = "sha256-bHYs+vlNku/T5Hb9u77Xml9/FNj5vgqPeXSzcilsS+I=";
32 };
33
34 propagatedBuildInputs = [
35 appdirs
36 arrow
37 docopt
38 inform
39 quantiphy
40 requests
41 ];
42
43 nativeCheckInputs = [
44 nestedtext
45 parametrize-from-file
46 pytestCheckHook
47 shlib
48 voluptuous
49 borgbackup
50 ];
51
52 # this disables testing fuse mounts
53 MISSING_DEPENDENCIES = "fuse";
54
55 postPatch = ''
56 patchShebangs .
57 '';
58
59 # this patch fixes a whitespace issue in the message that a test is expecting, https://github.com/KenKundert/emborg/pull/67
60 patches = [
61 (fetchpatch {
62 url = "https://github.com/KenKundert/emborg/commit/afac6d1ddcecdb4bddbec87b6c8eed4cfbf4ebf9.diff";
63 sha256 = "3xg2z03FLKH4ckmiBZqE1FDjpgjgdO8OZL1ewrJlQ4o=";
64 })
65 ];
66
67 pythonImportsCheck = [
68 "emborg"
69 ];
70
71 meta = with lib; {
72 description = "Interactive command line interface to Borg Backup";
73 homepage = "https://github.com/KenKundert/emborg";
74 changelog = "https://github.com/KenKundert/emborg/releases/tag/v${version}";
75 license = licenses.gpl3Plus;
76 maintainers = with maintainers; [ jpetrucciani ];
77 };
78}