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

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

59 lines
1.3 KiB
Nix
Raw Normal View History

2021-08-24 07:18:18 +00:00
{ lib
, python3Packages
, fetchFromGitHub
2024-01-18 02:02:40 +00:00
, fetchpatch
2021-08-24 07:18:18 +00:00
, tarsnap
}:
python3Packages.buildPythonApplication rec {
2021-08-24 07:18:18 +00:00
pname = "tarsnapper";
2024-01-18 02:02:40 +00:00
version = "0.5";
pyproject = true;
src = fetchFromGitHub {
owner = "miracle2k";
2021-08-24 07:18:18 +00:00
repo = pname;
rev = version;
2024-01-18 02:02:40 +00:00
hash = "sha256-5i9eum9hbh6VFhvEIDq5Uapy6JtIbf9jZHhRYZVoC1w=";
};
2024-01-18 02:02:40 +00:00
patches = [
# Fix failing tests when default_deltas is None
(fetchpatch {
url = "https://github.com/miracle2k/tarsnapper/commit/2ee33ce748b9bb42d559cc2c0104115732cb4150.patch";
hash = "sha256-fEXGhzlfB+J5lw1pcsC5Ne7I8UMnDzwyyCx/zm15+fU=";
})
];
nativeBuildInputs = with python3Packages; [
pythonRelaxDepsHook
setuptools
];
2021-08-24 07:18:18 +00:00
propagatedBuildInputs = with python3Packages; [
pyyaml
python-dateutil
pexpect
];
nativeCheckInputs = with python3Packages; [
2024-01-18 02:02:40 +00:00
pytestCheckHook
2021-08-24 07:18:18 +00:00
nose
];
2024-01-18 02:02:40 +00:00
# Remove standard module argparse from requirements
pythonRemoveDeps = [ "argparse" ];
2021-08-24 07:18:18 +00:00
makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ tarsnap ]}" ];
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;
2024-01-18 02:02:40 +00:00
maintainers = with maintainers; [ gmacon ];
mainProgram = "tarsnapper";
2021-08-24 07:18:18 +00:00
};
}