backblaze-b2: 3.7.0 -> 3.9.0

Changelog: https://github.com/Backblaze/B2_Command_Line_Tool/blob/v3.9.0/CHANGELOG.md
This commit is contained in:
natsukium 2023-09-05 00:02:53 +09:00
parent 53ffac981f
commit e6be272cf8
No known key found for this signature in database
GPG Key ID: 9EA45A31DB994C53

View File

@ -1,13 +1,14 @@
{ lib, python3Packages, fetchPypi }: { lib, python3Packages, fetchPypi, installShellFiles }:
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
pname = "backblaze-b2"; pname = "backblaze-b2";
version = "3.7.0"; version = "3.9.0";
format = "setuptools";
src = fetchPypi { src = fetchPypi {
inherit version; inherit version;
pname = "b2"; pname = "b2";
sha256 = "sha256-sW6gaZWUh3WX+0+qHRlQ4gZzKU4bL8ePPNKWo9rdF84="; hash = "sha256-Z9LQapWl0zblcAyMOfKhn5/O1H6+tmgiPQfAB241jqU=";
}; };
postPatch = '' postPatch = ''
@ -19,22 +20,27 @@ python3Packages.buildPythonApplication rec {
--replace 'setuptools_scm<6.0' 'setuptools_scm' --replace 'setuptools_scm<6.0' 'setuptools_scm'
''; '';
nativeBuildInputs = with python3Packages; [ nativeBuildInputs = [
setuptools-scm installShellFiles
python3Packages.setuptools-scm
]; ];
propagatedBuildInputs = with python3Packages; [ propagatedBuildInputs = with python3Packages; [
argcomplete
arrow
b2sdk b2sdk
phx-class-registry phx-class-registry
setuptools setuptools
docutils docutils
rst2ansi rst2ansi
tabulate tabulate
tqdm
]; ];
nativeCheckInputs = with python3Packages; [ nativeCheckInputs = with python3Packages; [
backoff backoff
more-itertools more-itertools
pexpect
pytestCheckHook pytestCheckHook
]; ];
@ -46,20 +52,25 @@ python3Packages.buildPythonApplication rec {
# require network # require network
"test_files_headers" "test_files_headers"
"test_integration" "test_integration"
# fixed by https://github.com/Backblaze/B2_Command_Line_Tool/pull/915
"TestRmConsoleTool"
]; ];
disabledTestPaths = [ disabledTestPaths = [
# requires network # requires network
"test/integration/test_b2_command_line.py" "test/integration/test_b2_command_line.py"
# it's hard to make it work on nix
"test/integration/test_autocomplete.py"
]; ];
postInstall = '' postInstall = ''
mv "$out/bin/b2" "$out/bin/backblaze-b2" mv "$out/bin/b2" "$out/bin/backblaze-b2"
sed 's/b2/backblaze-b2/' -i contrib/bash_completion/b2 installShellCompletion --cmd backblaze-b2 \
--bash <(${python3Packages.argcomplete}/bin/register-python-argcomplete backblaze-b2) \
mkdir -p "$out/share/bash-completion/completions" --zsh <(${python3Packages.argcomplete}/bin/register-python-argcomplete backblaze-b2)
cp contrib/bash_completion/b2 "$out/share/bash-completion/completions/backblaze-b2"
''; '';
meta = with lib; { meta = with lib; {