2021-08-24 09:18:18 +02:00
|
|
|
{ lib
|
|
|
|
, python3Packages
|
|
|
|
, fetchFromGitHub
|
|
|
|
, tarsnap
|
|
|
|
}:
|
2017-07-16 12:10:10 +02:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
2021-08-24 09:18:18 +02:00
|
|
|
pname = "tarsnapper";
|
2017-07-16 12:10:10 +02:00
|
|
|
version = "0.4";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "miracle2k";
|
2021-08-24 09:18:18 +02:00
|
|
|
repo = pname;
|
2017-07-16 12:10:10 +02:00
|
|
|
rev = version;
|
|
|
|
sha256 = "03db49188f4v1946c8mqqj30ah10x68hbg3a58js0syai32v12pm";
|
|
|
|
};
|
|
|
|
|
2021-08-24 09:18:18 +02:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
pyyaml
|
|
|
|
python-dateutil
|
|
|
|
pexpect
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = with python3Packages; [
|
|
|
|
nose
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Remove standard module argparse from requirements
|
|
|
|
./remove-argparse.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ tarsnap ]}" ];
|
2017-07-16 12:10:10 +02:00
|
|
|
|
|
|
|
checkPhase = ''
|
2021-08-24 09:18:18 +02:00
|
|
|
runHook preCheck
|
|
|
|
nosetests tests
|
|
|
|
runHook postCheck
|
2017-07-16 12:10:10 +02:00
|
|
|
'';
|
|
|
|
|
2021-08-24 09:18:18 +02:00
|
|
|
pythonImportsCheck = [ "tarsnapper" ];
|
2017-07-16 12:10:10 +02:00
|
|
|
|
2021-08-24 09:18:18 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Wrapper which expires backups using a gfs-scheme";
|
|
|
|
homepage = "https://github.com/miracle2k/tarsnapper";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
2017-07-16 12:10:10 +02:00
|
|
|
}
|