2021-08-25 08:27:29 +00:00
|
|
|
{ lib
|
|
|
|
, python3Packages
|
|
|
|
, fetchFromGitHub
|
|
|
|
, tarsnap
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
2021-08-25 08:27:29 +00:00
|
|
|
pname = "tarsnapper";
|
2020-04-24 23:36:52 +00:00
|
|
|
version = "0.4";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "miracle2k";
|
2021-08-25 08:27:29 +00:00
|
|
|
repo = pname;
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "03db49188f4v1946c8mqqj30ah10x68hbg3a58js0syai32v12pm";
|
|
|
|
};
|
|
|
|
|
2021-08-25 08:27:29 +00: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 ]}" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
2021-08-25 08:27:29 +00:00
|
|
|
runHook preCheck
|
|
|
|
nosetests tests
|
|
|
|
runHook postCheck
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-08-25 08:27:29 +00:00
|
|
|
pythonImportsCheck = [ "tarsnapper" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-25 08:27:29 +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; [ ];
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|