2021-08-24 07:18:18 +00:00
|
|
|
{ lib
|
|
|
|
, python3Packages
|
|
|
|
, fetchFromGitHub
|
|
|
|
, tarsnap
|
|
|
|
}:
|
2017-07-16 10:10:10 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
2021-08-24 07:18:18 +00:00
|
|
|
pname = "tarsnapper";
|
2017-07-16 10:10:10 +00:00
|
|
|
version = "0.4";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "miracle2k";
|
2021-08-24 07:18:18 +00:00
|
|
|
repo = pname;
|
2017-07-16 10:10:10 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "03db49188f4v1946c8mqqj30ah10x68hbg3a58js0syai32v12pm";
|
|
|
|
};
|
|
|
|
|
2021-08-24 07:18:18 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
pyyaml
|
|
|
|
python-dateutil
|
|
|
|
pexpect
|
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = with python3Packages; [
|
2021-08-24 07:18:18 +00:00
|
|
|
nose
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Remove standard module argparse from requirements
|
|
|
|
./remove-argparse.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ tarsnap ]}" ];
|
2017-07-16 10:10:10 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
2021-08-24 07:18:18 +00:00
|
|
|
runHook preCheck
|
|
|
|
nosetests tests
|
|
|
|
runHook postCheck
|
2017-07-16 10:10:10 +00:00
|
|
|
'';
|
|
|
|
|
2021-08-24 07:18:18 +00:00
|
|
|
pythonImportsCheck = [ "tarsnapper" ];
|
2017-07-16 10:10:10 +00:00
|
|
|
|
2021-08-24 07:18:18 +00: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 10:10:10 +00:00
|
|
|
}
|