Fabian Affolter 2024-04-06 18:03:23 +02:00
parent 5ab66e0a24
commit 52a69d191f
1 changed files with 19 additions and 11 deletions

View File

@ -10,23 +10,25 @@
python3Packages.buildPythonApplication rec {
pname = "backblaze-b2";
version = "3.17.0";
format = "pyproject";
version = "3.18.0";
pyproject = true;
src = fetchFromGitHub {
owner = "Backblaze";
repo = "B2_Command_Line_Tool";
rev = "v${version}";
hash = "sha256-Xj7RNe6XM2atijhVasILWRdTzu6xuKBzMllM1z1mFLY=";
rev = "refs/tags/v${version}";
hash = "sha256-1UXByc3jjp8GN7+aI2GBohJ0DFxgp604QOsXp5GaL4Q=";
};
nativeBuildInputs = [
installShellFiles
] ++ (with python3Packages; [
pdm-backend
]);
];
propagatedBuildInputs = with python3Packages; [
build-system = with python3Packages; [
pdm-backend
];
dependencies = with python3Packages; [
argcomplete
arrow
b2sdk
@ -53,10 +55,9 @@ python3Packages.buildPythonApplication rec {
'';
disabledTestPaths = [
# requires network
# Test requires network
"test/integration/test_b2_command_line.py"
"test/integration/test_tqdm_closer.py"
# it's hard to make it work on nix
"test/integration/test_autocomplete.py"
"test/unit/test_console_tool.py"
@ -64,6 +65,13 @@ python3Packages.buildPythonApplication rec {
"test/unit/_cli/test_autocomplete_cache.py"
];
disabledTests = [
# Autocomplete is not successful in a sandbox
"test_autocomplete_installer"
"test_help"
"test_install_autocomplete"
];
postInstall = lib.optionalString (execName != "b2") ''
mv "$out/bin/b2" "$out/bin/${execName}"
''
@ -86,10 +94,10 @@ python3Packages.buildPythonApplication rec {
meta = with lib; {
description = "Command-line tool for accessing the Backblaze B2 storage service";
mainProgram = "backblaze-b2";
homepage = "https://github.com/Backblaze/B2_Command_Line_Tool";
changelog = "https://github.com/Backblaze/B2_Command_Line_Tool/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ hrdinka tomhoule ];
mainProgram = "backblaze-b2";
};
}