nixpkgs/pkgs/tools/backup/tarsnapper/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
997 B
Nix
Raw Normal View History

2021-08-24 09:18:18 +02:00
{ lib
, python3Packages
, fetchFromGitHub
, tarsnap
}:
python3Packages.buildPythonApplication rec {
2021-08-24 09:18:18 +02:00
pname = "tarsnapper";
version = "0.4";
src = fetchFromGitHub {
owner = "miracle2k";
2021-08-24 09:18:18 +02:00
repo = pname;
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 ]}" ];
checkPhase = ''
2021-08-24 09:18:18 +02:00
runHook preCheck
nosetests tests
runHook postCheck
'';
2021-08-24 09:18:18 +02:00
pythonImportsCheck = [ "tarsnapper" ];
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; [ ];
};
}