diff options
Diffstat (limited to 'nixpkgs/pkgs/development/tools/backblaze-b2/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/tools/backblaze-b2/default.nix | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/nixpkgs/pkgs/development/tools/backblaze-b2/default.nix b/nixpkgs/pkgs/development/tools/backblaze-b2/default.nix index b1671b098b32..446d54f90ca4 100644 --- a/nixpkgs/pkgs/development/tools/backblaze-b2/default.nix +++ b/nixpkgs/pkgs/development/tools/backblaze-b2/default.nix @@ -1,43 +1,37 @@ -{ lib, buildPythonApplication, fetchFromGitHub -, arrow, futures, logfury, requests, six, tqdm -}: +{ fetchFromGitHub, lib, python3Packages }: -buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "backblaze-b2"; - version = "1.3.8"; + version = "2.1.0"; src = fetchFromGitHub { owner = "Backblaze"; repo = "B2_Command_Line_Tool"; rev = "v${version}"; - sha256 = "1y4z4w6fj92rh9mrjsi0nmnzcmrj5jikarq2vs5qznvjdjm62igw"; + sha256 = "1kkpvxqgh5pw4kr8lh5gy9d7960hv9zvajbjiqhj6xgykwbpbgmq"; }; - propagatedBuildInputs = [ arrow futures logfury requests six tqdm ]; + propagatedBuildInputs = with python3Packages; [ + b2sdk + class-registry + phx-class-registry + setuptools + ]; - checkPhase = '' - python test_b2_command_line.py test - ''; - - postPatch = '' - # b2 uses an upper bound on arrow, because arrow 0.12.1 is not - # compatible with Python 2.6: - # - # https://github.com/crsmithdev/arrow/issues/517 - # - # However, since we use Python 2.7, newer versions of arrow are fine. + checkInputs = with python3Packages; [ pytestCheckHook ]; - sed -i 's/,<0.12.1//g' requirements.txt - ''; + disabledTests = [ + "test_files_headers" + "test_integration" + ]; postInstall = '' mv "$out/bin/b2" "$out/bin/backblaze-b2" - sed 's/^_have b2 \&\&$/_have backblaze-b2 \&\&/' -i contrib/bash_completion/b2 - sed 's/^\(complete -F _b2\) b2/\1 backblaze-b2/' -i contrib/bash_completion/b2 + sed 's/b2/backblaze-b2/' -i contrib/bash_completion/b2 - mkdir -p "$out/etc/bash_completion.d" - cp contrib/bash_completion/b2 "$out/etc/bash_completion.d/backblaze-b2" + mkdir -p "$out/share/bash-completion/completions" + cp contrib/bash_completion/b2 "$out/share/bash-completion/completions/backblaze-b2" ''; meta = with lib; { |