1 { lib, python3Packages, fetchPypi, installShellFiles }:
3 python3Packages.buildPythonApplication rec {
4 pname = "backblaze-b2";
11 hash = "sha256-Z9LQapWl0zblcAyMOfKhn5/O1H6+tmgiPQfAB241jqU=";
15 substituteInPlace requirements.txt \
16 --replace 'phx-class-registry==4.0.5' 'phx-class-registry'
17 substituteInPlace requirements.txt \
18 --replace 'tabulate==0.8.10' 'tabulate'
19 substituteInPlace setup.py \
20 --replace 'setuptools_scm<6.0' 'setuptools_scm'
25 python3Packages.setuptools-scm
28 propagatedBuildInputs = with python3Packages; [
40 nativeCheckInputs = with python3Packages; [
48 export HOME=$(mktemp -d)
56 # fixed by https://github.com/Backblaze/B2_Command_Line_Tool/pull/915
62 "test/integration/test_b2_command_line.py"
64 # it's hard to make it work on nix
65 "test/integration/test_autocomplete.py"
69 mv "$out/bin/b2" "$out/bin/backblaze-b2"
71 installShellCompletion --cmd backblaze-b2 \
72 --bash <(${python3Packages.argcomplete}/bin/register-python-argcomplete backblaze-b2) \
73 --zsh <(${python3Packages.argcomplete}/bin/register-python-argcomplete backblaze-b2)
77 description = "Command-line tool for accessing the Backblaze B2 storage service";
78 homepage = "https://github.com/Backblaze/B2_Command_Line_Tool";
79 changelog = "https://github.com/Backblaze/B2_Command_Line_Tool/blob/v${version}/CHANGELOG.md";
80 license = licenses.mit;
81 maintainers = with maintainers; [ hrdinka kevincox tomhoule ];