nixpkgs-suyu/pkgs/development/tools/backblaze-b2/default.nix

45 lines
1.1 KiB
Nix
Raw Normal View History

2020-11-24 22:36:26 +01:00
{ fetchFromGitHub, lib, python3Packages }:
2016-02-04 00:45:01 +01:00
2020-09-25 22:29:52 +02:00
python3Packages.buildPythonApplication rec {
2017-12-02 14:42:13 +01:00
pname = "backblaze-b2";
2020-11-24 22:36:26 +01:00
version = "2.1.0";
2016-02-04 00:45:01 +01:00
src = fetchFromGitHub {
owner = "Backblaze";
repo = "B2_Command_Line_Tool";
2017-12-02 14:42:13 +01:00
rev = "v${version}";
2020-11-24 22:36:26 +01:00
sha256 = "1kkpvxqgh5pw4kr8lh5gy9d7960hv9zvajbjiqhj6xgykwbpbgmq";
2016-02-04 00:45:01 +01:00
};
2020-09-25 22:29:52 +02:00
propagatedBuildInputs = with python3Packages; [
b2sdk
class-registry
2020-11-24 22:36:26 +01:00
phx-class-registry
2020-09-25 22:29:52 +02:00
setuptools
];
2016-03-06 18:14:25 +01:00
2020-11-24 22:36:26 +01:00
checkInputs = with python3Packages; [ pytestCheckHook ];
2016-02-04 00:45:01 +01:00
2020-11-24 22:36:26 +01:00
disabledTests = [
"test_files_headers"
"test_integration"
];
2016-03-06 18:14:25 +01:00
postInstall = ''
mv "$out/bin/b2" "$out/bin/backblaze-b2"
2020-09-25 22:29:52 +02:00
sed 's/b2/backblaze-b2/' -i contrib/bash_completion/b2
2016-03-06 18:14:25 +01:00
mkdir -p "$out/share/bash-completion/completions"
cp contrib/bash_completion/b2 "$out/share/bash-completion/completions/backblaze-b2"
2016-02-04 00:45:01 +01:00
'';
2017-12-02 14:42:13 +01:00
meta = with lib; {
description = "Command-line tool for accessing the Backblaze B2 storage service";
homepage = "https://github.com/Backblaze/B2_Command_Line_Tool";
2016-03-06 18:14:25 +01:00
license = licenses.mit;
maintainers = with maintainers; [ hrdinka kevincox ];
platforms = platforms.unix;
2016-02-04 00:45:01 +01:00
};
}