tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
tarsnapper: add meta
Fabian Affolter
4 years ago
76a5135b
e1fb0c6a
+33
-9
1 changed file
expand all
collapse all
unified
split
pkgs
tools
backup
tarsnapper
default.nix
+33
-9
pkgs/tools/backup/tarsnapper/default.nix
···
1
-
{ python3Packages, fetchFromGitHub , tarsnap }:
0
0
0
0
2
3
python3Packages.buildPythonApplication rec {
4
-
name = "tarsnapper-${version}";
5
version = "0.4";
6
7
src = fetchFromGitHub {
8
owner = "miracle2k";
9
-
repo = "tarsnapper";
10
rev = version;
11
sha256 = "03db49188f4v1946c8mqqj30ah10x68hbg3a58js0syai32v12pm";
12
};
13
14
-
checkInputs = with python3Packages; [ nose pytest ];
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
15
16
checkPhase = ''
17
-
py.test .
0
0
18
'';
19
20
-
propagatedBuildInputs = with python3Packages; [ pyyaml python-dateutil pexpect ];
21
22
-
patches = [ ./remove-argparse.patch ];
23
-
24
-
makeWrapperArgs = ["--prefix PATH : ${tarsnap}/bin"];
0
0
0
25
}
···
1
+
{ lib
2
+
, python3Packages
3
+
, fetchFromGitHub
4
+
, tarsnap
5
+
}:
6
7
python3Packages.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
+
checkInputs = 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
}