diff options
Diffstat (limited to 'nixpkgs/pkgs/development/tools/backblaze-b2/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/tools/backblaze-b2/default.nix | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/development/tools/backblaze-b2/default.nix b/nixpkgs/pkgs/development/tools/backblaze-b2/default.nix index 353fda20ce19..3bab2e7bba2f 100644 --- a/nixpkgs/pkgs/development/tools/backblaze-b2/default.nix +++ b/nixpkgs/pkgs/development/tools/backblaze-b2/default.nix @@ -1,13 +1,14 @@ -{ lib, python3Packages, fetchPypi }: +{ lib, python3Packages, fetchPypi, installShellFiles }: python3Packages.buildPythonApplication rec { pname = "backblaze-b2"; - version = "3.7.0"; + version = "3.9.0"; + format = "setuptools"; src = fetchPypi { inherit version; pname = "b2"; - sha256 = "sha256-sW6gaZWUh3WX+0+qHRlQ4gZzKU4bL8ePPNKWo9rdF84="; + hash = "sha256-Z9LQapWl0zblcAyMOfKhn5/O1H6+tmgiPQfAB241jqU="; }; postPatch = '' @@ -19,22 +20,27 @@ python3Packages.buildPythonApplication rec { --replace 'setuptools_scm<6.0' 'setuptools_scm' ''; - nativeBuildInputs = with python3Packages; [ - setuptools-scm + nativeBuildInputs = [ + installShellFiles + python3Packages.setuptools-scm ]; propagatedBuildInputs = with python3Packages; [ + argcomplete + arrow b2sdk phx-class-registry setuptools docutils rst2ansi tabulate + tqdm ]; nativeCheckInputs = with python3Packages; [ backoff more-itertools + pexpect pytestCheckHook ]; @@ -46,25 +52,31 @@ python3Packages.buildPythonApplication rec { # require network "test_files_headers" "test_integration" + + # fixed by https://github.com/Backblaze/B2_Command_Line_Tool/pull/915 + "TestRmConsoleTool" ]; disabledTestPaths = [ # requires network "test/integration/test_b2_command_line.py" + + # it's hard to make it work on nix + "test/integration/test_autocomplete.py" ]; postInstall = '' mv "$out/bin/b2" "$out/bin/backblaze-b2" - sed 's/b2/backblaze-b2/' -i contrib/bash_completion/b2 - - mkdir -p "$out/share/bash-completion/completions" - cp contrib/bash_completion/b2 "$out/share/bash-completion/completions/backblaze-b2" + installShellCompletion --cmd backblaze-b2 \ + --bash <(${python3Packages.argcomplete}/bin/register-python-argcomplete backblaze-b2) \ + --zsh <(${python3Packages.argcomplete}/bin/register-python-argcomplete backblaze-b2) ''; meta = with lib; { description = "Command-line tool for accessing the Backblaze B2 storage service"; 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 kevincox tomhoule ]; }; |