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
1003 B
Nix
Raw Normal View History

2021-08-24 07:18:18 +00:00
{ lib
, python3Packages
, fetchFromGitHub
, tarsnap
}:
python3Packages.buildPythonApplication rec {
2021-08-24 07:18:18 +00:00
pname = "tarsnapper";
version = "0.4";
src = fetchFromGitHub {
owner = "miracle2k";
2021-08-24 07:18:18 +00:00
repo = pname;
rev = version;
sha256 = "03db49188f4v1946c8mqqj30ah10x68hbg3a58js0syai32v12pm";
};
2021-08-24 07:18:18 +00:00
propagatedBuildInputs = with python3Packages; [
pyyaml
python-dateutil
pexpect
];
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 ]}" ];
checkPhase = ''
2021-08-24 07:18:18 +00:00
runHook preCheck
nosetests tests
runHook postCheck
'';
2021-08-24 07:18:18 +00:00
pythonImportsCheck = [ "tarsnapper" ];
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; [ ];
};
}