571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
62 lines
1.6 KiB
Nix
62 lines
1.6 KiB
Nix
{ lib
|
|
, python3Packages
|
|
, fetchFromGitHub
|
|
, fetchpatch
|
|
, tarsnap
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "tarsnapper";
|
|
version = "0.5";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "miracle2k";
|
|
repo = pname;
|
|
rev = version;
|
|
hash = "sha256-5i9eum9hbh6VFhvEIDq5Uapy6JtIbf9jZHhRYZVoC1w=";
|
|
};
|
|
|
|
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=";
|
|
})
|
|
# Migrate to pytest, see: https://github.com/miracle2k/tarsnapper/pull/73
|
|
(fetchpatch {
|
|
url = "https://github.com/miracle2k/tarsnapper/commit/eace01f3085fba8a6421d4f19110b814511e5170.patch?full_index=1";
|
|
hash = "sha256-2YPb7iaAusT1DkISfOWs72jr/GBY/qG5qFyRlnVt0IY=";
|
|
})
|
|
];
|
|
|
|
nativeBuildInputs = with python3Packages; [
|
|
setuptools
|
|
];
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
pyyaml
|
|
python-dateutil
|
|
pexpect
|
|
];
|
|
|
|
nativeCheckInputs = with python3Packages; [
|
|
pytestCheckHook
|
|
];
|
|
|
|
# Remove standard module argparse from requirements
|
|
pythonRemoveDeps = [ "argparse" ];
|
|
|
|
makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ tarsnap ]}" ];
|
|
|
|
pythonImportsCheck = [ "tarsnapper" ];
|
|
|
|
meta = with lib; {
|
|
description = "Wrapper which expires backups using a gfs-scheme";
|
|
homepage = "https://github.com/miracle2k/tarsnapper";
|
|
license = licenses.bsd2;
|
|
maintainers = with maintainers; [ gmacon ];
|
|
mainProgram = "tarsnapper";
|
|
};
|
|
}
|