Merge pull request #275980 from linyinfeng/b2-cli-fix

backblaze-b2: add missing dependency setuptools
This commit is contained in:
Atemu 2023-12-25 20:02:07 +01:00 committed by GitHub
commit a730613643
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
{ lib, python3Packages, fetchPypi, installShellFiles }:
{ lib, python3Packages, fetchPypi, installShellFiles, testers, backblaze-b2 }:
python3Packages.buildPythonApplication rec {
pname = "backblaze-b2";
@ -36,6 +36,7 @@ python3Packages.buildPythonApplication rec {
tqdm
platformdirs
packaging
setuptools
];
nativeCheckInputs = with python3Packages; [
@ -75,6 +76,15 @@ python3Packages.buildPythonApplication rec {
--zsh <(${python3Packages.argcomplete}/bin/register-python-argcomplete backblaze-b2)
'';
passthru.tests.version = (testers.testVersion {
package = backblaze-b2;
command = "backblaze-b2 version --short";
}).overrideAttrs (old: {
# workaround the error: Permission denied: '/homeless-shelter'
# backblaze-b2 fails to create a 'b2' directory under the XDG config path
HOME = "$(mktemp -d)";
});
meta = with lib; {
description = "Command-line tool for accessing the Backblaze B2 storage service";
homepage = "https://github.com/Backblaze/B2_Command_Line_Tool";