1{ lib
2, python3Packages
3, fetchFromGitHub
4, tarsnap
5}:
6
7python3Packages.buildPythonApplication rec {
8 pname = "tarsnapper";
9 version = "0.4";
10
11 src = fetchFromGitHub {
12 owner = "miracle2k";
13 repo = pname;
14 rev = version;
15 sha256 = "03db49188f4v1946c8mqqj30ah10x68hbg3a58js0syai32v12pm";
16 };
17
18 propagatedBuildInputs = with python3Packages; [
19 pyyaml
20 python-dateutil
21 pexpect
22 ];
23
24 nativeCheckInputs = with python3Packages; [
25 nose
26 ];
27
28 patches = [
29 # Remove standard module argparse from requirements
30 ./remove-argparse.patch
31 ];
32
33 makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ tarsnap ]}" ];
34
35 checkPhase = ''
36 runHook preCheck
37 nosetests tests
38 runHook postCheck
39 '';
40
41 pythonImportsCheck = [ "tarsnapper" ];
42
43 meta = with lib; {
44 description = "Wrapper which expires backups using a gfs-scheme";
45 homepage = "https://github.com/miracle2k/tarsnapper";
46 license = licenses.bsd2;
47 maintainers = with maintainers; [ ];
48 };
49}