1 { fetchFromGitHub, lib, python3Packages }:
3 python3Packages.buildPythonApplication rec {
4 pname = "backblaze-b2";
7 src = python3Packages.fetchPypi {
10 sha256 = "sha256-qHnnUTSLY1yncqIjG+IMLoNauvgwU04qsvH7dZZ8AlI=";
14 substituteInPlace requirements.txt \
15 --replace 'tabulate==0.8.10' 'tabulate'
16 substituteInPlace setup.py \
17 --replace 'setuptools_scm<6.0' 'setuptools_scm'
20 nativeBuildInputs = with python3Packages; [
24 propagatedBuildInputs = with python3Packages; [
33 checkInputs = with python3Packages; [
40 export HOME=$(mktemp -d)
51 "test/integration/test_b2_command_line.py"
55 mv "$out/bin/b2" "$out/bin/backblaze-b2"
57 sed 's/b2/backblaze-b2/' -i contrib/bash_completion/b2
59 mkdir -p "$out/share/bash-completion/completions"
60 cp contrib/bash_completion/b2 "$out/share/bash-completion/completions/backblaze-b2"
64 description = "Command-line tool for accessing the Backblaze B2 storage service";
65 homepage = "https://github.com/Backblaze/B2_Command_Line_Tool";
66 license = licenses.mit;
67 maintainers = with maintainers; [ hrdinka kevincox tomhoule ];