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